forked from extern/nushell
default to $nothing if cellpath not found (#6535)
* default to if cellpath not found * fmt * add test * fix test * fix clippy * move behaviour behind `-i` flag * prevent any possibility of an unspanned error * ignore all errors * seperate testes * fmt
This commit is contained in:
@ -159,3 +159,27 @@ fn selects_many_rows() {
|
||||
assert_eq!(actual.out, "2");
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn select_ignores_errors_succesfully1() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
[{a: 1, b: 2} {a: 3, b: 5} {a: 3}] | select -i b
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.is_empty());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn select_ignores_errors_succesfully2() {
|
||||
let actual = nu!(
|
||||
cwd: ".", pipeline(
|
||||
r#"
|
||||
[{a: 1} {a: 2} {a: 3}] | select -i b
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(actual.err.is_empty());
|
||||
}
|
||||
|
Reference in New Issue
Block a user