mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 22:07:57 +02:00
to json -r
not removing whitespaces fix (#11948)
fixes #11900 # Description Use `serde_json` instead. # User-Facing Changes The problem described in the issue now no longer persists. No whitespace in the output of `to json --raw` Output of unicode escape changed to consistent `\uffff` # Tests + Formatting I corrected all Tests that were affected by this change.
This commit is contained in:
@ -62,7 +62,7 @@ fn ls_sort_by_name_sensitive() {
|
||||
"
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "B.txt"},{"name": "C"},{"name": "a.txt"}]"#;
|
||||
let json_output = r#"[{"name":"B.txt"},{"name":"C"},{"name":"a.txt"}]"#;
|
||||
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
@ -79,7 +79,7 @@ fn ls_sort_by_name_insensitive() {
|
||||
"
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "a.txt"},{"name": "B.txt"},{"name": "C"}]"#;
|
||||
let json_output = r#"[{"name":"a.txt"},{"name":"B.txt"},{"name":"C"}]"#;
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ fn ls_sort_by_type_name_sensitive() {
|
||||
"
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "C","type": "Dir"},{"name": "B.txt","type": "File"},{"name": "a.txt","type": "File"}]"#;
|
||||
let json_output = r#"[{"name":"C","type":"Dir"},{"name":"B.txt","type":"File"},{"name":"a.txt","type":"File"}]"#;
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ fn ls_sort_by_type_name_insensitive() {
|
||||
"
|
||||
));
|
||||
|
||||
let json_output = r#"[{"name": "C","type": "Dir"},{"name": "a.txt","type": "File"},{"name": "B.txt","type": "File"}]"#;
|
||||
let json_output = r#"[{"name":"C","type":"Dir"},{"name":"a.txt","type":"File"},{"name":"B.txt","type":"File"}]"#;
|
||||
assert_eq!(actual.out, json_output);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user