1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 03:27:44 +00:00

sleep: use UResult (#2492)

* sleep: use UResult in util

* sleep: add in error + test for it

* sleep: UResult - removed some verbosity
This commit is contained in:
Son Nguyen 2021-07-12 11:20:23 -07:00 committed by GitHub
parent 35a9b7f1fb
commit 6c26976edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 9 deletions

View file

@ -110,3 +110,10 @@ fn test_sleep_sum_duration_many() {
let duration = before_test.elapsed();
assert!(duration >= millis_900);
}
#[test]
fn test_sleep_wrong_time() {
new_ucmd!()
.args(&["0.1s", "abc"])
.fails();
}