mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cut: Flush BufWriter
, centralize output file logic
This commit is contained in:
parent
07cce029cb
commit
cba48c0284
2 changed files with 44 additions and 20 deletions
|
@ -375,3 +375,15 @@ fn test_output_delimiter_with_adjacent_ranges() {
|
|||
.succeeds()
|
||||
.stdout_only("ab:cd\n");
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[test]
|
||||
fn test_failed_write_is_reported() {
|
||||
new_ucmd!()
|
||||
.arg("-d=")
|
||||
.arg("-f1")
|
||||
.pipe_in("key=value")
|
||||
.set_stdout(std::fs::File::create("/dev/full").unwrap())
|
||||
.fails()
|
||||
.stderr_is("cut: write error: No space left on device\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue