From 74419366fd817cc921bbdbb4197ec21f12c72804 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 22 Feb 2023 21:24:08 +0100 Subject: [PATCH] timeout: add a test to verify that it fails as expected Follow up of PR #4388 --- 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 79d128d51..deedea6c7 100644 --- a/tests/by-util/test_timeout.rs +++ b/tests/by-util/test_timeout.rs @@ -121,6 +121,14 @@ fn test_invalid_signal() { .usage_error("'invalid': invalid signal"); } +#[test] +fn test_invalid_multi_byte_characters() { + new_ucmd!() + .args(&["10€", "sleep", "0"]) + .fails() + .usage_error("invalid time interval '10€'"); +} + /// Test that the long form of the `--kill-after` argument is recognized. #[test] fn test_kill_after_long() {