Fix default duplicates column (#4452)

* Add test to ensure default not adding dup. columns

* Fix for default adding duplicate columns
This commit is contained in:
Andrew Barnes
2022-02-13 21:38:46 +11:00
committed by GitHub
parent e82ffc4dee
commit 77eb4c4188
2 changed files with 12 additions and 2 deletions

View File

@ -232,6 +232,14 @@ fn length_for_rows() -> TestResult {
run_test(r#"[[name,age,grade]; [bill,20,a] [a b c]] | length"#, "2")
}
#[test]
fn length_defaulted_columns() -> TestResult {
run_test(
r#"echo [[name, age]; [test, 10]] | default age 11 | get 0 | columns | length"#,
"2",
)
}
#[test]
fn get_fuzzy() -> TestResult {
run_test("(ls | get -i foo) == $nothing", "true")