tee: fix < . message and strip errno

This commit is contained in:
oech3
2026-04-01 22:24:50 +02:00
committed by Sylvestre Ledru
parent 1e81775caf
commit 531991d344
4 changed files with 17 additions and 4 deletions
+9
View File
@@ -16,6 +16,15 @@ use std::time::Duration;
// spell-checker:ignore nopipe
#[test]
#[cfg(unix)]
fn test_error_stdin_directory() {
new_ucmd!()
.set_stdin(std::fs::File::open(".").unwrap())
.fails_with_code(1)
.stderr_is("tee: read error: Is a directory\n");
}
#[test]
fn test_invalid_arg() {
new_ucmd!().arg("--definitely-invalid").fails_with_code(1);