forked from extern/nushell
Fix precedence parsing of parens. Limit use (#1606)
This commit is contained in:
@ -131,3 +131,15 @@ fn compound_where() {
|
||||
|
||||
assert_eq!(actual, r#"{"a":2,"b":1}"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compound_where_paren() {
|
||||
let actual = nu!(
|
||||
cwd: "tests/fixtures/formats", pipeline(
|
||||
r#"
|
||||
echo '[{"a": 1, "b": 1}, {"a": 2, "b": 1}, {"a": 2, "b": 2}]' | from-json | where (a == 2 && b == 1) || b == 2 | to-json
|
||||
"#
|
||||
));
|
||||
|
||||
assert_eq!(actual, r#"[{"a":2,"b":1},{"a":2,"b":2}]"#);
|
||||
}
|
||||
|
Reference in New Issue
Block a user