forked from extern/nushell
14512988ba
Rename `all?`, `any?` and `empty?` to `all`, `any` and `is-empty` for sake of simplicity and consistency. - More understandable for newcomers, that these commands are no special to others. - `?` syntax did not really aprove readability. For me it made it worse. - We can reserve `?` syntax for any other nushell feature.
22 lines
463 B
Rust
22 lines
463 B
Rust
use nu_test_support::{nu, pipeline};
|
|
|
|
#[test]
|
|
fn reports_emptiness() {
|
|
let actual = nu!(
|
|
cwd: ".", pipeline(
|
|
r#"
|
|
echo [[are_empty];
|
|
[([[check]; [[]] ])]
|
|
[([[check]; [""] ])]
|
|
[([[check]; [{}] ])]
|
|
]
|
|
| get are_empty
|
|
| all {
|
|
is-empty check
|
|
}
|
|
"#
|
|
));
|
|
|
|
assert_eq!(actual.out, "true");
|
|
}
|