mirror of
https://github.com/nushell/nushell.git
synced 2025-08-18 14:00:58 +02:00
Add wrap and get and cell_path parsing
This commit is contained in:
13
src/tests.rs
13
src/tests.rs
@@ -396,3 +396,16 @@ fn from_json_2() -> TestResult {
|
||||
"Sally",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn wrap() -> TestResult {
|
||||
run_test(r#"([1, 2, 3] | wrap foo).foo.1"#, "2")
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get() -> TestResult {
|
||||
run_test(
|
||||
r#"[[name, grade]; [Alice, A], [Betty, B]] | get grade.1"#,
|
||||
"B",
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user