mirror of
https://github.com/nushell/nushell.git
synced 2025-08-19 00:16:10 +02:00
Implement to-bson
This commit is contained in:
@@ -106,6 +106,17 @@ fn can_convert_table_to_json_text_and_from_json_text_back_into_table() {
|
||||
assert_eq!(output, "markup");
|
||||
}
|
||||
|
||||
#[test]
|
||||
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"
|
||||
);
|
||||
|
||||
assert_eq!(output, "42");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn can_convert_table_to_toml_text_and_from_toml_text_back_into_table() {
|
||||
nu!(
|
||||
|
Reference in New Issue
Block a user