Skip to content

Commit 1470270

Browse files
authored
Merge pull request #7940 from Qelxiros/7671-timeout-tests
timeout: add hex parsing test
2 parents 263ba63 + 384878b commit 1470270

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+
.no_output();
208+
}

0 commit comments

Comments
 (0)