forked from extern/nushell
fix default after an empty where (#10240)
should close https://github.com/nushell/nushell/issues/10237 # Description this is @fdncred's findings 😋 i just made the PR 😌 # User-Facing Changes ```nushell [a b] | where $it == 'c' | last | default 'd' ``` now works and gives `d` # Tests + Formatting adds a new `default_after_empty_filter` test. # After Submitting
This commit is contained in:
@ -33,3 +33,10 @@ fn adds_row_data_if_column_missing() {
|
||||
assert_eq!(actual.out, "2");
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn default_after_empty_filter() {
|
||||
let actual = nu!("[a b] | where $it == 'c' | last | default 'd'");
|
||||
|
||||
assert_eq!(actual.out, "d");
|
||||
}
|
||||
|
Reference in New Issue
Block a user