mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 07:00:37 +02:00
Make it-expansion work when in a list (#1903)
This commit is contained in:
@ -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!(
|
||||
|
Reference in New Issue
Block a user