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

Merge pull request #7188 from ic3man5/main

sort: errors on overflowing -k argument but shouldn't
This commit is contained in:
Sylvestre Ledru 2025-01-22 10:05:51 +01:00 committed by GitHub
commit f731f2cba3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 3 deletions

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);
}