1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 19:47:45 +00:00

test(sort): add test for overflowing -k argument

This commit is contained in:
David Rebbe 2025-01-20 21:13:43 -05:00
parent 6a5f2aa334
commit 3535bfdc72

View file

@ -1302,3 +1302,14 @@ fn test_same_sort_mode_twice() {
fn test_args_override() {
new_ucmd!().args(&["-f", "-f"]).pipe_in("foo").succeeds();
}
#[test]
fn test_k_overflow() {
let input = "2\n1\n";
let output = "1\n2\n";
new_ucmd!()
.args(&["-k", "18446744073709551616"])
.pipe_in(input)
.succeeds()
.stdout_is(output);
}