mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Canonical expr block (#1584)
* Add the canonical form for an expression block * Remove commented out code
This commit is contained in:
@ -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!(
|
||||
|
Reference in New Issue
Block a user