mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
sort: Flush BufWriter
, don't panic on write errors
This commit is contained in:
parent
bfdde70309
commit
d456e90596
4 changed files with 44 additions and 18 deletions
|
@ -1336,3 +1336,13 @@ fn test_human_blocks_r_and_q() {
|
|||
fn test_args_check_conflict() {
|
||||
new_ucmd!().arg("-c").arg("-C").fails();
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_failed_write_is_reported() {
|
||||
new_ucmd!()
|
||||
.pipe_in("hello")
|
||||
.set_stdout(std::fs::File::create("/dev/full").unwrap())
|
||||
.fails()
|
||||
.stderr_is("sort: write failed: 'standard output': No space left on device\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue