From 3955354b3a9283b0f1217887e7a23dd1d35f7575 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 6 Mar 2022 23:17:29 +0100 Subject: [PATCH] timeout: add a test for empty arg --- tests/by-util/test_timeout.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/by-util/test_timeout.rs b/tests/by-util/test_timeout.rs index 9be29065a..5db91a44d 100644 --- a/tests/by-util/test_timeout.rs +++ b/tests/by-util/test_timeout.rs @@ -45,3 +45,11 @@ fn test_zero_timeout() { .no_stderr() .no_stdout(); } + +#[test] +fn test_command_empty_args() { + new_ucmd!() + .args(&["", ""]) + .fails() + .stderr_contains("timeout: empty string"); +}