mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 00:38:36 +02:00
Add 'from json'
This commit is contained in:
14
src/tests.rs
14
src/tests.rs
@ -382,3 +382,17 @@ fn module_imports_5() -> TestResult {
|
||||
"3",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_json_1() -> TestResult {
|
||||
run_test(r#"('{"name": "Fred"}' | from json).name"#, "Fred")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn from_json_2() -> TestResult {
|
||||
run_test(
|
||||
r#"('{"name": "Fred"}
|
||||
{"name": "Sally"}' | from json -o).name.1"#,
|
||||
"Sally",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user