Skip to content

Commit 3535bfd

Browse files
committed
test(sort): add test for overflowing -k argument
1 parent 6a5f2aa commit 3535bfd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/by-util/test_sort.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,3 +1302,14 @@ fn test_same_sort_mode_twice() {
13021302
fn test_args_override() {
13031303
new_ucmd!().args(&["-f", "-f"]).pipe_in("foo").succeeds();
13041304
}
1305+
1306+
#[test]
1307+
fn test_k_overflow() {
1308+
let input = "2\n1\n";
1309+
let output = "1\n2\n";
1310+
new_ucmd!()
1311+
.args(&["-k", "18446744073709551616"])
1312+
.pipe_in(input)
1313+
.succeeds()
1314+
.stdout_is(output);
1315+
}

0 commit comments

Comments
 (0)