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:
commit
6a9660f9f6
2 changed files with 35 additions and 18 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue