Properly redirect invocations (#2070)

* Properly redirect invocations

* Don't convert with-env yet, as there's a random test failure
This commit is contained in:
Jonathan Turner
2020-06-28 09:04:57 +12:00
committed by GitHub
parent 8b3964f518
commit dffc9c9b1c
5 changed files with 45 additions and 4 deletions

View File

@ -84,13 +84,25 @@ fn it_expansion_of_invocation() {
assert_eq!(actual.out, "4");
}
#[test]
fn invocation_properly_redirects() {
let actual = nu!(
cwd: ".",
r#"
echo $(nu --testbin cococo "hello") | str collect
"#
);
assert_eq!(actual.out, "hello");
}
#[test]
fn argument_invocation() {
let actual = nu!(
cwd: ".",
r#"
echo "foo" | echo $(echo $it)
"#
echo "foo" | echo $(echo $it)
"#
);
assert_eq!(actual.out, "foo");