add tests for out_greater_pipe
This commit is contained in:
parent
ad6fc9073a
commit
366e3d4103
|
@ -653,7 +653,7 @@ fn try_lex_special_piped_item(
|
|||
return (
|
||||
None,
|
||||
Some(ParseError::Expected(
|
||||
"|, note: redirection stdout to pipe is the same as piping directly.",
|
||||
"|. Note: redirection stdout to pipe is the same as piping directly.",
|
||||
Span::new(span_offset + offset, span_offset + offset + o_pipe_len),
|
||||
)),
|
||||
);
|
||||
|
|
|
@ -1161,3 +1161,11 @@ fn command_not_found_error_shows_not_found_2() {
|
|||
&& actual.err.contains("Did you mean `for`?")
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn error_on_out_greater_pipe() {
|
||||
let actual = nu!(r#""foo" o>| print"#);
|
||||
assert!(actual
|
||||
.err
|
||||
.contains("redirection stdout to pipe is the same as piping directly"))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user