mirror of
https://github.com/nushell/nushell
synced 2025-01-14 22:24:54 +00:00
Improve test so that it should work on Windows
This commit is contained in:
parent
87a99bbabf
commit
738675259e
3 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ fn open_can_parse_bson_1() {
|
||||||
nu!(
|
nu!(
|
||||||
output,
|
output,
|
||||||
cwd("tests/fixtures/formats"),
|
cwd("tests/fixtures/formats"),
|
||||||
"open sample.bson | nth 0 | get b | echo $it"
|
"open sample.bson | get root | nth 0 | get b | echo $it"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(output, "hello");
|
assert_eq!(output, "hello");
|
||||||
|
@ -39,7 +39,7 @@ fn open_can_parse_bson_2() {
|
||||||
nu!(
|
nu!(
|
||||||
output,
|
output,
|
||||||
cwd("tests/fixtures/formats"),
|
cwd("tests/fixtures/formats"),
|
||||||
"open sample.bson | nth 6 | get b | get '$binary_subtype' | echo $it "
|
"open sample.bson | get root | nth 6 | get b | get '$binary_subtype' | echo $it "
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(output, "function");
|
assert_eq!(output, "function");
|
||||||
|
|
|
@ -111,10 +111,10 @@ fn can_convert_json_text_to_bson_and_back_into_table() {
|
||||||
nu!(
|
nu!(
|
||||||
output,
|
output,
|
||||||
cwd("tests/fixtures/formats"),
|
cwd("tests/fixtures/formats"),
|
||||||
"echo '{\"root\":[{\"x\": 2, \"y\": 4}, {\"z\": \"42\"}]}' | from-json | to-bson | from-bson | get root | nth 1 | get z | echo $it"
|
"open sample.bson | to-bson | from-bson | get root | nth 1 | get b | echo $it"
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(output, "42");
|
assert_eq!(output, "whel");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
BIN
tests/fixtures/formats/sample.bson
vendored
BIN
tests/fixtures/formats/sample.bson
vendored
Binary file not shown.
Loading…
Reference in a new issue