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:
amtoine
2023-03-11 12:33:46 +01:00
parent 5fe0fc9135
commit 9159377af8
19 changed files with 52 additions and 52 deletions

View File

@@ -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,

View File

@@ -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}");