mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 14:00:58 +02:00
Add record literal syntax (#326)
This commit is contained in:
10
src/tests.rs
10
src/tests.rs
@@ -889,3 +889,13 @@ fn in_variable_5() -> TestResult {
|
||||
fn in_variable_6() -> TestResult {
|
||||
run_test(r#"3 | if $in > 6 { $in - 10 } else { $in * 10 }"#, "30")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn record_1() -> TestResult {
|
||||
run_test(r#"{'a': 'b'} | get a"#, "b")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn record_2() -> TestResult {
|
||||
run_test(r#"{'b': 'c'}.b"#, "c")
|
||||
}
|
||||
|
Reference in New Issue
Block a user