mirror of
https://github.com/nushell/nushell.git
synced 2025-08-15 13:53:13 +02:00
Fix numeric comparison with nothing (#1508)
This commit is contained in:
@ -10,6 +10,16 @@ fn filters_by_unit_size_comparison() {
|
||||
assert_eq!(actual, "cargo_sample.toml");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn filters_with_nothing_comparison() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats",
|
||||
r#"echo '[{"foo": 3}, {"foo": null}, {"foo": 4}]' | from-json | where foo > 1 | get foo | sum | echo $it"#
|
||||
);
|
||||
|
||||
assert_eq!(actual, "7");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn binary_operator_comparisons() {
|
||||
let actual = nu!(
|
||||
|
Reference in New Issue
Block a user