mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 10:22:12 +02:00
fix the tests by using to nuon --raw
to have single-line results
Commands used: ``` sd "to nuon\"" "to nuon --raw\"" **/*.rs git restore crates/nu-command/src/formats/to/nuon.rs ``` and some manuals tweaks as well.
This commit is contained in:
@@ -80,7 +80,7 @@ fn test_no_color_flag() {
|
||||
fn test_list() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"to html --list | where name == C64 | get 0 | to nuon"#
|
||||
r#"to html --list | where name == C64 | get 0 | to nuon --raw"#
|
||||
);
|
||||
assert_eq!(
|
||||
actual.out,
|
||||
|
@@ -457,14 +457,14 @@ fn does_not_quote_strings_unnecessarily() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
let test = [["a", "b", "c d"]; [1 2 3] [4 5 6]]; $test | to nuon
|
||||
let test = [["a", "b", "c d"]; [1 2 3] [4 5 6]]; $test | to nuon --raw
|
||||
"#
|
||||
));
|
||||
assert_eq!(actual.out, "[[a, b, \"c d\"]; [1, 2, 3], [4, 5, 6]]");
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
let a = {"ro name": "sam" rank: 10}; $a | to nuon
|
||||
let a = {"ro name": "sam" rank: 10}; $a | to nuon --raw
|
||||
"#
|
||||
));
|
||||
assert_eq!(actual.out, "{\"ro name\": sam, rank: 10}");
|
||||
|
Reference in New Issue
Block a user