mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
timeout: handle arguments for the command to run
To prevent clap from parsing flags for the command to run as flags for timeout, remove the "args" positional argument, but allow to pass flags via the "command" positional arg.
This commit is contained in:
parent
3e8c009a50
commit
c5d7cbda32
2 changed files with 18 additions and 18 deletions
|
@ -9,3 +9,11 @@ fn test_subcommand_return_code() {
|
|||
|
||||
new_ucmd!().arg("1").arg("false").run().status_code(1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_command_with_args() {
|
||||
new_ucmd!()
|
||||
.args(&["1700", "echo", "-n", "abcd"])
|
||||
.succeeds()
|
||||
.stdout_only("abcd");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue