mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 02:55:07 +02:00
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:
@ -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");
|
||||
|
Reference in New Issue
Block a user