nushell/crates/nu-engine/tests/evaluate/invocation.rs
Leonhard Kipp fec50d8cfe
Fix bug #2921 (#2945)
* Fix bug #2921

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

* Add test
2021-01-21 07:58:37 +13:00

14 lines
263 B
Rust

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]")
}