1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-15 19:36:16 +00:00

Merge pull request #4268 from rivy/fix.sleep

Fix `sleep` argument parsing and errors
This commit is contained in:
Sylvestre Ledru 2023-01-12 18:41:04 +01:00 committed by GitHub
commit 6a9660f9f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 18 deletions

View file

@ -9,6 +9,10 @@ fn test_invalid_time_interval() {
.arg("xyz")
.fails()
.usage_error("invalid time interval 'xyz'");
new_ucmd!()
.args(&["--", "-1"])
.fails()
.usage_error("invalid time interval '-1'");
}
#[test]
@ -75,7 +79,7 @@ fn test_sleep_zero_duration() {
#[test]
fn test_sleep_no_argument() {
new_ucmd!().fails();
new_ucmd!().fails().usage_error("missing operand");
}
#[test]