Remove interpretation of Primitive::Nothing as the number 0. (#1836)

This commit is contained in:
Jason Gedge
2020-05-18 15:18:46 -04:00
committed by GitHub
parent 0743b69ad5
commit 6efabef8d3
8 changed files with 6 additions and 18 deletions

View File

@ -33,7 +33,7 @@ fn cal_friday_the_thirteenths_in_2015() {
let actual = nu!(
cwd: ".", pipeline(
r#"
cal --full-year 2015 | where friday == 13 | count
cal --full-year 2015 | get friday | compact | where $it == 13 | count
"#
));

View File

@ -14,7 +14,7 @@ fn filters_by_unit_size_comparison() {
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"#
r#"echo '[{"foo": 3}, {"foo": null}, {"foo": 4}]' | from json | get foo | compact | where $it > 1 | sum | echo $it"#
);
assert_eq!(actual.out, "7");