Commit Graph
23 Commits
Author SHA1 Message Date
Dorian Peron 6e23d4e979 tests: patch tests to simplify imports 2025-07-01 03:36:46 +02:00
Jeremy Smart 5bcc56add5 sleep: add tests 2025-04-17 21:42:38 -04:00
Jeremy Smart 7f2fb0483a update tests 2025-04-14 07:34:41 -04:00
Sylvestre Ledru a0179ea239 uutests: adjust the tests to use them 2025-03-28 21:40:31 +01:00
Etienne Cordonnier 8ab99d4bfe test(sleep): add test for signal handling 2024-10-25 16:47:40 +02:00
Ben Wiederhake 9eb7c85ab2 dircolors+join+sleep: optimize int and string ops as required by clippy nightly 2024-08-11 23:56:30 +02:00
Sylvestre Ledru bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Daniel Hofstetter cef9ab10c3 sleep: adapt two tests to fundu 2.0.0 2023-08-08 09:10:33 +02:00
Daniel Hofstetter ad37db8da3 sleep: fix broken tests due to fundu update 2023-05-01 14:25:59 +02:00
Daniel Hofstetter 6988eb7ec6 tests: expand wildcard imports 2023-03-20 15:32:35 +01:00
Joining7943 5fb091a4fb sleep: Use fundu error types to improve error messages 2023-03-12 15:37:44 +01:00
Joining7943 71bbebdc76 sleep: Fix whitespace issues. Don't panic when adding durations.
Refactor error propagation and use show_error! instead of USimpleError.
2023-03-07 13:33:49 +01:00
Joining7943 68f75af678 sleep: Fix duration parsing of multiple inputs when duration overflow should saturate and not panic 2023-02-28 08:04:55 +01:00
Roy Ivy III f8b545d6f8 test/sleep: add and refine sleep test cases 2023-01-08 12:10:32 -06:00
Jeffrey Finkelstein f4af226820 uucore: error on negative interval in parse_time
Return an error when a negative interval is provided as the argument
to `uucore::parse_time::from_str()`, since a `Duration` should only be
non-negative.
2022-03-21 21:11:31 -04:00
Jeffrey Finkelstein c39c917db7 sleep: give usage error on invalid time interval
For example,

    $ sleep xyz
    sleep: invalid time interval 'xyz'
    Try 'sleep --help' for more information.

This matches the behavior of GNU sleep.
2022-03-20 15:21:50 -04:00
Jeffrey Finkelstein ce2a026ff8 sleep: use Duration::saturating_add to sum times
Use `Duration::saturating_add()` to avoid a panic due to overflow when
adding the durations provided as command-line arguments.
2022-03-18 23:15:02 -04:00
Jeffrey Finkelstein 388cb6c83a uucore: use Duration::saturating_mul in parse_time
Use `Duration::saturating_mul()` to avoid a panic due to overflow in
`uucore::parse_time::from_str()`. This change prevents panic on very
large arguments to timeout and sleep.
2022-03-18 23:15:02 -04:00
Terts Diepraam 337d257e8d tests/sleep: fmt 2021-07-12 20:21:20 +02:00
Son NguyenandGitHub 6c26976edb sleep: use UResult (#2492)
* sleep: use UResult in util

* sleep: add in error + test for it

* sleep: UResult - removed some verbosity
2021-07-12 20:20:23 +02:00
Andre Julius 53c3fedf33 sleep: Add more test cases
As mentioned here:
https://github.com/uutils/coreutils/pull/1777#discussion_r593807712
2021-03-15 14:36:38 +01:00
Andre JuliusandGitHub 2158b2c5b4 sleep: move from getopts to clap #1735 (#1777)
and Add some sleep test cases #1735
2021-03-13 23:11:11 +01:00
Roy Ivy III 1b3bb56e66 tests ~ add missing test_UTIL module files (with 'ToDO' comments)
- common_core utils
- additional 'windows' utils
- additional 'unix' utils
2020-06-02 11:25:09 -05:00