mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
tail: fix tailing /dev/zero
This fixes a bug where tail would run forever when tailing /dev/zero. This behavior matches GNU tail.
This commit is contained in:
parent
5f0077ecf8
commit
37611550d3
4 changed files with 33 additions and 23 deletions
|
@ -4923,3 +4923,12 @@ fn test_failed_write_is_reported() {
|
|||
.fails()
|
||||
.stderr_is("tail: No space left on device\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(target_os = "linux")]
|
||||
fn test_dev_zero() {
|
||||
new_ucmd!()
|
||||
.args(&["-c", "1", "/dev/zero"])
|
||||
.succeeds()
|
||||
.stdout_only("\0");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue