mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 21:17:49 +02:00
add in a new command called columns (#519)
This commit is contained in:
13
src/tests.rs
13
src/tests.rs
@ -1287,3 +1287,16 @@ fn flatten_table_column_get_last() -> TestResult {
|
||||
"0.22",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_table_columns_1() -> TestResult {
|
||||
run_test(
|
||||
"[[name, age, grade]; [paul,21,a]] | columns | first",
|
||||
"name",
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn get_table_columns_2() -> TestResult {
|
||||
run_test("[[name, age, grade]; [paul,21,a]] | columns | nth 1", "age")
|
||||
}
|
||||
|
Reference in New Issue
Block a user