mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
tr: handle broken pipe gracefully
This commit is contained in:
parent
d04d0cd987
commit
31a5b54dc6
3 changed files with 27 additions and 7 deletions
|
@ -1554,3 +1554,13 @@ fn test_failed_write_is_reported() {
|
|||
.fails()
|
||||
.stderr_is("tr: write error: No space left on device\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_broken_pipe_no_error() {
|
||||
new_ucmd!()
|
||||
.args(&["e", "a"])
|
||||
.pipe_in("hello".repeat(100))
|
||||
.run_stdout_starts_with(b"")
|
||||
.success()
|
||||
.stderr_is("");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue