Make it-expansion work when in a list (#1903)

This commit is contained in:
Jonathan Turner
2020-05-27 20:29:05 +12:00
committed by GitHub
parent 49b0592e3c
commit e2dabecc0b
2 changed files with 20 additions and 0 deletions

View File

@ -60,6 +60,18 @@ fn proper_it_expansion() {
})
}
#[test]
fn it_expansion_of_list() {
let actual = nu!(
cwd: ".",
r#"
echo "foo" | echo [bar $it] | to json
"#
);
assert_eq!(actual.out, "[\"bar\",\"foo\"]");
}
#[test]
fn argument_invocation() {
let actual = nu!(