From 384878b5df11dca90a002a4b1e398e6bfc072cca Mon Sep 17 00:00:00 2001 From: Jeremy Smart Date: Thu, 15 May 2025 22:38:59 -0400 Subject: [PATCH] add timeout test for hex parsing --- tests/by-util/test_timeout.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/by-util/test_timeout.rs b/tests/by-util/test_timeout.rs index 0a9be672f..ee8e9d18f 100644 --- a/tests/by-util/test_timeout.rs +++ b/tests/by-util/test_timeout.rs @@ -1,3 +1,5 @@ +use std::time::Duration; + // This file is part of the uutils coreutils package. // // For the full copyright and license information, please view the LICENSE @@ -195,3 +197,12 @@ fn test_kill_subprocess() { .stdout_contains("inside_trap") .stderr_contains("Terminated"); } + +#[test] +fn test_hex_timeout_ending_with_d() { + new_ucmd!() + .args(&["0x0.1d", "sleep", "10"]) + .timeout(Duration::from_secs(1)) + .fails_with_code(124) + .no_output(); +}