mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
ptx: Flush BufWriter
, add context to errors
This commit is contained in:
parent
cba48c0284
commit
bfdde70309
2 changed files with 17 additions and 2 deletions
|
@ -163,3 +163,14 @@ fn test_format() {
|
|||
.succeeds()
|
||||
.stdout_only("\\xx {}{}{a}{}{}\n");
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_failed_write_is_reported() {
|
||||
new_ucmd!()
|
||||
.arg("-G")
|
||||
.pipe_in("hello")
|
||||
.set_stdout(std::fs::File::create("/dev/full").unwrap())
|
||||
.fails()
|
||||
.stderr_is("ptx: write failed: No space left on device\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue