1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

uniq: Flush BufWriter, make error context GNU-like

This commit is contained in:
Jan Verbeek 2025-03-31 13:25:06 +02:00
parent 181844eafa
commit a9cd3f132e
2 changed files with 13 additions and 1 deletions

View file

@ -1181,3 +1181,14 @@ fn test_stdin_w1_multibyte() {
.succeeds()
.stdout_is("à\ná\n");
}
#[cfg(target_os = "linux")]
#[test]
fn test_failed_write_is_reported() {
new_ucmd!()
.pipe_in("hello")
.args(&["-z"])
.set_stdout(std::fs::File::create("/dev/full").unwrap())
.fails()
.stderr_is("uniq: write error: No space left on device\n");
}