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

timeout: give usage error on invalid time interval

This commit is contained in:
Jeffrey Finkelstein 2022-03-20 15:16:03 -04:00
parent 04b219bdef
commit e849aaf846
2 changed files with 10 additions and 2 deletions

View file

@ -11,6 +11,14 @@ fn test_subcommand_return_code() {
new_ucmd!().arg("1").arg("false").run().status_code(1);
}
#[test]
fn test_invalid_time_interval() {
new_ucmd!()
.args(&["xyz", "sleep", "0"])
.fails()
.usage_error("invalid time interval 'xyz'");
}
#[test]
fn test_command_with_args() {
new_ucmd!()