Canonical expr block (#1584)

* Add the canonical form for an expression block

* Remove commented out code
This commit is contained in:
Jonathan Turner
2020-04-14 06:59:33 +12:00
committed by GitHub
parent 08a09e2273
commit e3da037b80
5 changed files with 102 additions and 21 deletions

View File

@ -20,6 +20,24 @@ fn filters_with_nothing_comparison() {
assert_eq!(actual, "7");
}
#[test]
fn explicit_block_condition() {
let actual = nu!(
cwd: "tests/fixtures/formats", pipeline(
r#"
open sample.db
| where table_name == ints
| get table_values
| first 4
| where {= $it.z > 4200}
| get z
| echo $it
"#
));
assert_eq!(actual, "4253");
}
#[test]
fn binary_operator_comparisons() {
let actual = nu!(