mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 10:36:00 +02:00
redirection: fix internal commands error with o+e>
redirection (#10816)
# Description Currently the following command is broken: ```nushell echo a o+e> 1.txt ``` It's because we don't redirect output of `echo` command. This pr is trying to fix it.
This commit is contained in:
@ -216,12 +216,14 @@ fn redirect_support_variable() {
|
||||
|
||||
assert!(output.out.contains("hello"));
|
||||
|
||||
let output = nu!(
|
||||
nu!(
|
||||
cwd: dirs.test(),
|
||||
"let x = 'tmp_file'; echo 'hello' out+err> $x; open tmp_file"
|
||||
"let x = 'tmp_file'; echo 'hello there' out+err> $x; open tmp_file"
|
||||
);
|
||||
|
||||
assert!(output.out.contains("hello"));
|
||||
// check for stdout redirection file.
|
||||
let expected_out_file = dirs.test().join("tmp_file");
|
||||
let actual = file_contents(expected_out_file);
|
||||
assert!(actual.contains("hello there"));
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user