Skip to content

Commit 3718db6

Browse files
committed
add timeout test for hex parsing
1 parent 8866ec3 commit 3718db6

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/by-util/test_timeout.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::time::Duration;
2+
13
// This file is part of the uutils coreutils package.
24
//
35
// For the full copyright and license information, please view the LICENSE
@@ -195,3 +197,12 @@ fn test_kill_subprocess() {
195197
.stdout_contains("inside_trap")
196198
.stderr_contains("Terminated");
197199
}
200+
201+
#[test]
202+
fn test_hex_timeout_ending_with_d() {
203+
new_ucmd!()
204+
.args(&["0x0.1d", "sleep", "10"])
205+
.timeout(Duration::from_secs(1))
206+
.fails_with_code(124)
207+
.stderr_contains("Terminated");
208+
}

0 commit comments

Comments
 (0)