mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
tail: implement sub-second sleep interval e.g. -s.1
This commit is contained in:
parent
b1317c589e
commit
1f24b1f59c
2 changed files with 19 additions and 9 deletions
|
@ -326,6 +326,16 @@ fn test_negative_indexing() {
|
|||
#[test]
|
||||
fn test_sleep_interval() {
|
||||
new_ucmd!().arg("-s").arg("10").arg(FOOBAR_TXT).succeeds();
|
||||
new_ucmd!().arg("-s").arg(".1").arg(FOOBAR_TXT).succeeds();
|
||||
new_ucmd!().arg("-s.1").arg(FOOBAR_TXT).succeeds();
|
||||
new_ucmd!().arg("-s").arg("-1").arg(FOOBAR_TXT).fails();
|
||||
new_ucmd!()
|
||||
.arg("-s")
|
||||
.arg("1..1")
|
||||
.arg(FOOBAR_TXT)
|
||||
.fails()
|
||||
.stderr_contains("invalid number of seconds: '1..1'")
|
||||
.code_is(1);
|
||||
}
|
||||
|
||||
/// Test for reading all but the first NUM bytes: `tail -c +3`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue