diff --git a/tests/command_open_tests.rs b/tests/command_open_tests.rs index bf33ec63f1..3f6da5adf5 100644 --- a/tests/command_open_tests.rs +++ b/tests/command_open_tests.rs @@ -28,7 +28,7 @@ fn open_can_parse_bson_1() { nu!( output, 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"); @@ -39,7 +39,7 @@ fn open_can_parse_bson_2() { nu!( output, 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"); diff --git a/tests/filters_test.rs b/tests/filters_test.rs index ac68ea5fff..710f0b89a8 100644 --- a/tests/filters_test.rs +++ b/tests/filters_test.rs @@ -111,10 +111,10 @@ fn can_convert_json_text_to_bson_and_back_into_table() { nu!( output, 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] diff --git a/tests/fixtures/formats/sample.bson b/tests/fixtures/formats/sample.bson index 95c98eb4e1..951c805065 100644 Binary files a/tests/fixtures/formats/sample.bson and b/tests/fixtures/formats/sample.bson differ