mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
test(sort): add test for overflowing -k argument
This commit is contained in:
parent
6a5f2aa334
commit
3535bfdc72
1 changed files with 11 additions and 0 deletions
|
@ -1302,3 +1302,14 @@ fn test_same_sort_mode_twice() {
|
||||||
fn test_args_override() {
|
fn test_args_override() {
|
||||||
new_ucmd!().args(&["-f", "-f"]).pipe_in("foo").succeeds();
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue