* Fix bug #2921

Moving whether a range should be parsed further back, giving e.G. parsing of
invocations precedence fixes the bug

* Add test
This commit is contained in:
Leonhard Kipp
2021-01-20 19:58:37 +01:00
committed by GitHub
parent 05e42381df
commit fec50d8cfe
3 changed files with 17 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
use nu_test_support::nu;
#[test]
fn test_parse_invocation_with_range() {
let actual = nu!(
cwd: ".",
r#"
let foo = 3
echo $(echo 1..$foo | each { echo $it }) | to json
"#
);
assert_eq!(actual.out, "[1,2,3]")
}

View File

@@ -1 +1,2 @@
mod invocation;
mod operator;