1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-02 05:57:46 +00:00

sort: compare strings before comparing hashes

Since lines that compare equal should be sorted together, we need to first
compare the lines (taking settings into account). Only if they do not compare
equal we should compare the hashes.
This commit is contained in:
Michael Debertol 2021-07-26 16:27:24 +02:00
parent f851fb6454
commit 3564dc5792
2 changed files with 26 additions and 1 deletions

View file

@ -235,6 +235,16 @@ fn test_random_shuffle_two_runs_not_the_same() {
}
}
#[test]
fn test_random_ignore_case() {
let input = "ABC\nABc\nAbC\nAbc\naBC\naBc\nabC\nabc\n";
new_ucmd!()
.args(&["-fR"])
.pipe_in(input)
.succeeds()
.stdout_is(input);
}
#[test]
fn test_numeric_floats_and_ints() {
test_helper(