mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
tty: correct exit code for write errrors
This commit is contained in:
parent
aeaf2cebfb
commit
4c5ee1dbd7
2 changed files with 20 additions and 3 deletions
|
@ -63,3 +63,12 @@ fn test_close_stdin_silent_alias() {
|
|||
fn test_wrong_argument() {
|
||||
new_ucmd!().args(&["a"]).fails().code_is(2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(not(windows))]
|
||||
fn test_stdout_fail() {
|
||||
let mut child = new_ucmd!().run_no_wait();
|
||||
drop(child.stdout.take());
|
||||
let status = child.wait().unwrap();
|
||||
assert_eq!(status.code(), Some(3));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue