mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
Sort: Implement stable sort, ignore non-printing, month sort dedup, auto parallel sort through rayon, zero terminated sort, check silent (#2008)
This commit is contained in:
parent
b26e12eaa4
commit
8474249e5f
35 changed files with 1442 additions and 213 deletions
|
@ -1,44 +1,82 @@
|
|||
use crate::common::util::*;
|
||||
|
||||
#[test]
|
||||
fn test_check_zero_terminated_failure() {
|
||||
new_ucmd!()
|
||||
.arg("-z")
|
||||
.arg("-c")
|
||||
.arg("zero-terminated.txt")
|
||||
.fails()
|
||||
.stdout_is("sort: disorder in line 0\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_check_zero_terminated_success() {
|
||||
new_ucmd!()
|
||||
.arg("-z")
|
||||
.arg("-c")
|
||||
.arg("zero-terminated.expected")
|
||||
.succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_random_shuffle_len() {
|
||||
// check whether output is the same length as the input
|
||||
const FILE: &'static str = "default_unsorted_ints.expected";
|
||||
let (at, _ucmd) = at_and_ucmd!();
|
||||
let result = new_ucmd!().arg("-R").arg(FILE).run().stdout;
|
||||
let expected = at.read(FILE);
|
||||
|
||||
assert_ne!(result, expected);
|
||||
assert_eq!(result.len(), expected.len());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_random_shuffle_contains_all_lines() {
|
||||
// check whether lines of input are all in output
|
||||
const FILE: &'static str = "default_unsorted_ints.expected";
|
||||
let (at, _ucmd) = at_and_ucmd!();
|
||||
let result = new_ucmd!().arg("-R").arg(FILE).run().stdout;
|
||||
let expected = at.read(FILE);
|
||||
let result_sorted = new_ucmd!().pipe_in(result.clone()).run().stdout;
|
||||
|
||||
assert_ne!(result, expected);
|
||||
assert_eq!(result_sorted, expected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_random_shuffle_contains_two_runs_not_the_same() {
|
||||
// check to verify that two random shuffles are not equal; this has the
|
||||
// potential to fail in the unlikely event that random order is the same
|
||||
// as the starting order, or if both random sorts end up having the same order.
|
||||
const FILE: &'static str = "default_unsorted_ints.expected";
|
||||
let (at, _ucmd) = at_and_ucmd!();
|
||||
let result = new_ucmd!().arg("-R").arg(FILE).run().stdout;
|
||||
let expected = at.read(FILE);
|
||||
let unexpected = new_ucmd!().arg("-R").arg(FILE).run().stdout;
|
||||
|
||||
assert_ne!(result, expected);
|
||||
assert_ne!(result, unexpected);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats_and_ints() {
|
||||
for numeric_sort_param in vec!["-n", "--numeric-sort"] {
|
||||
let input = "1.444\n8.013\n1\n-8\n1.04\n-1";
|
||||
new_ucmd!()
|
||||
.arg(numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8\n-1\n1\n1.04\n1.444\n8.013\n");
|
||||
}
|
||||
test_helper("numeric_floats_and_ints", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats() {
|
||||
for numeric_sort_param in vec!["-n", "--numeric-sort"] {
|
||||
let input = "1.444\n8.013\n1.58590\n-8.90880\n1.040000000\n-.05";
|
||||
new_ucmd!()
|
||||
.arg(numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8.90880\n-.05\n1.040000000\n1.444\n1.58590\n8.013\n");
|
||||
}
|
||||
test_helper("numeric_floats", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats_with_nan() {
|
||||
for numeric_sort_param in vec!["-n", "--numeric-sort"] {
|
||||
let input = "1.444\n1.0/0.0\n1.58590\n-8.90880\n1.040000000\n-.05";
|
||||
new_ucmd!()
|
||||
.arg(numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8.90880\n-.05\n1.0/0.0\n1.040000000\n1.444\n1.58590\n");
|
||||
}
|
||||
test_helper("numeric_floats_with_nan", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_unfixed_floats() {
|
||||
test_helper("numeric_fixed_floats", "-n");
|
||||
test_helper("numeric_unfixed_floats", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -53,26 +91,12 @@ fn test_numeric_unsorted_ints() {
|
|||
|
||||
#[test]
|
||||
fn test_human_block_sizes() {
|
||||
for human_numeric_sort_param in vec!["-h", "--human-numeric-sort"] {
|
||||
let input = "8981K\n909991M\n-8T\n21G\n0.8M";
|
||||
new_ucmd!()
|
||||
.arg(human_numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8T\n0.8M\n8981K\n21G\n909991M\n");
|
||||
}
|
||||
test_helper("human_block_sizes", "-h");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_month_default() {
|
||||
for month_sort_param in vec!["-M", "--month-sort"] {
|
||||
let input = "JAn\nMAY\n000may\nJun\nFeb";
|
||||
new_ucmd!()
|
||||
.arg(month_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("000may\nJAn\nFeb\nMAY\nJun\n");
|
||||
}
|
||||
test_helper("month_default", "-M");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -82,23 +106,12 @@ fn test_month_stable() {
|
|||
|
||||
#[test]
|
||||
fn test_default_unsorted_ints() {
|
||||
let input = "9\n1909888\n000\n1\n2";
|
||||
new_ucmd!()
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("000\n1\n1909888\n2\n9\n");
|
||||
test_helper("default_unsorted_ints", "");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_unique_ints() {
|
||||
for numeric_unique_sort_param in vec!["-nu"] {
|
||||
let input = "9\n9\n8\n1\n";
|
||||
new_ucmd!()
|
||||
.arg(numeric_unique_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("1\n8\n9\n");
|
||||
}
|
||||
test_helper("numeric_unsorted_ints_unique", "-nu");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
@ -116,6 +129,148 @@ fn test_dictionary_order() {
|
|||
test_helper("dictionary_order", "-d");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_dictionary_order2() {
|
||||
for non_dictionary_order2_param in vec!["-d"] {
|
||||
new_ucmd!()
|
||||
.pipe_in("a👦🏻aa b\naaaa b")
|
||||
.arg(non_dictionary_order2_param)
|
||||
.succeeds()
|
||||
.stdout_only("a👦🏻aa b\naaaa b\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_non_printing_chars() {
|
||||
for non_printing_chars_param in vec!["-i"] {
|
||||
new_ucmd!()
|
||||
.pipe_in("a👦🏻aa b\naaaa b")
|
||||
.arg(non_printing_chars_param)
|
||||
.succeeds()
|
||||
.stdout_only("aaaa b\na👦🏻aa b\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_exponents_positive_general_fixed() {
|
||||
for exponents_positive_general_param in vec!["-g"] {
|
||||
new_ucmd!()
|
||||
.pipe_in("100E6\n\n50e10\n+100000\n\n10000K78\n10E\n\n\n1000EDKLD\n\n\n100E6\n\n50e10\n+100000\n\n")
|
||||
.arg(exponents_positive_general_param)
|
||||
.succeeds()
|
||||
.stdout_only("\n\n\n\n\n\n\n\n10000K78\n1000EDKLD\n10E\n+100000\n+100000\n100E6\n100E6\n50e10\n50e10\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_exponents_positive_numeric() {
|
||||
test_helper("exponents-positive-numeric", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_months_dedup() {
|
||||
test_helper("months-dedup", "-Mu");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mixed_floats_ints_chars_numeric() {
|
||||
test_helper("mixed_floats_ints_chars_numeric", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mixed_floats_ints_chars_numeric_unique() {
|
||||
test_helper("mixed_floats_ints_chars_numeric_unique", "-nu");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mixed_floats_ints_chars_numeric_reverse() {
|
||||
test_helper("mixed_floats_ints_chars_numeric_unique_reverse", "-nur");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_mixed_floats_ints_chars_numeric_stable() {
|
||||
test_helper("mixed_floats_ints_chars_numeric_stable", "-ns");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats_and_ints2() {
|
||||
for numeric_sort_param in vec!["-n", "--numeric-sort"] {
|
||||
let input = "1.444\n8.013\n1\n-8\n1.04\n-1";
|
||||
new_ucmd!()
|
||||
.arg(numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8\n-1\n1\n1.04\n1.444\n8.013\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats2() {
|
||||
for numeric_sort_param in vec!["-n", "--numeric-sort"] {
|
||||
let input = "1.444\n8.013\n1.58590\n-8.90880\n1.040000000\n-.05";
|
||||
new_ucmd!()
|
||||
.arg(numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8.90880\n-.05\n1.040000000\n1.444\n1.58590\n8.013\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_floats_with_nan2() {
|
||||
test_helper("numeric-floats-with-nan2", "-n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_human_block_sizes2() {
|
||||
for human_numeric_sort_param in vec!["-h", "--human-numeric-sort"] {
|
||||
let input = "8981K\n909991M\n-8T\n21G\n0.8M";
|
||||
new_ucmd!()
|
||||
.arg(human_numeric_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("-8T\n0.8M\n8981K\n21G\n909991M\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_month_default2() {
|
||||
for month_sort_param in vec!["-M", "--month-sort"] {
|
||||
let input = "JAn\nMAY\n000may\nJun\nFeb";
|
||||
new_ucmd!()
|
||||
.arg(month_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("000may\nJAn\nFeb\nMAY\nJun\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_default_unsorted_ints2() {
|
||||
let input = "9\n1909888\n000\n1\n2";
|
||||
new_ucmd!()
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("000\n1\n1909888\n2\n9\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_numeric_unique_ints2() {
|
||||
for numeric_unique_sort_param in vec!["-nu"] {
|
||||
let input = "9\n9\n8\n1\n";
|
||||
new_ucmd!()
|
||||
.arg(numeric_unique_sort_param)
|
||||
.pipe_in(input)
|
||||
.succeeds()
|
||||
.stdout_only("1\n8\n9\n");
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_zero_terminated() {
|
||||
test_helper("zero-terminated", "-z");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multiple_files() {
|
||||
new_ucmd!()
|
||||
|
@ -192,6 +347,15 @@ fn test_check() {
|
|||
.stdout_is("");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_check_silent() {
|
||||
new_ucmd!()
|
||||
.arg("-C")
|
||||
.arg("check_fail.txt")
|
||||
.fails()
|
||||
.stdout_is("");
|
||||
}
|
||||
|
||||
fn test_helper(file_name: &str, args: &str) {
|
||||
new_ucmd!()
|
||||
.arg(args)
|
||||
|
|
12
tests/fixtures/sort/exponents-positive-general.expected
vendored
Normal file
12
tests/fixtures/sort/exponents-positive-general.expected
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
10E
|
||||
1000EDKLD
|
||||
10000K78
|
||||
+100000
|
||||
100E6
|
||||
50e10
|
12
tests/fixtures/sort/exponents-positive-general.txt
vendored
Normal file
12
tests/fixtures/sort/exponents-positive-general.txt
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
10000K78
|
||||
10E
|
||||
|
||||
|
||||
1000EDKLD
|
||||
|
||||
|
||||
100E6
|
||||
|
||||
50e10
|
||||
+100000
|
||||
|
12
tests/fixtures/sort/exponents-positive-numeric.expected
vendored
Normal file
12
tests/fixtures/sort/exponents-positive-numeric.expected
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+100000
|
||||
10E
|
||||
50e10
|
||||
100E6
|
||||
1000EDKLD
|
||||
10000K78
|
12
tests/fixtures/sort/exponents-positive-numeric.txt
vendored
Normal file
12
tests/fixtures/sort/exponents-positive-numeric.txt
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
10000K78
|
||||
10E
|
||||
|
||||
|
||||
1000EDKLD
|
||||
|
||||
|
||||
100E6
|
||||
|
||||
50e10
|
||||
+100000
|
||||
|
37
tests/fixtures/sort/human-mixed-inputs-reverse.expected
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs-reverse.expected
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
.2T
|
||||
2G
|
||||
100M
|
||||
7800900K
|
||||
51887300-
|
||||
1890777
|
||||
56908-90078
|
||||
6780.0009866
|
||||
6780.000986
|
||||
789----009999 90-0 90-0
|
||||
1
|
||||
0001
|
||||
apr
|
||||
MAY
|
||||
JUNNNN
|
||||
JAN
|
||||
AUG
|
||||
APR
|
||||
0000000
|
||||
00
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-1.4
|
37
tests/fixtures/sort/human-mixed-inputs-reverse.txt
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs-reverse.txt
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
0001
|
||||
|
||||
1
|
||||
|
||||
-1.4
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
1890777
|
||||
|
||||
56908-90078
|
||||
|
||||
51887300-
|
||||
|
||||
6780.0009866
|
||||
|
||||
789----009999 90-0 90-0
|
||||
|
||||
6780.000986
|
||||
|
||||
100M
|
||||
7800900K
|
||||
2G
|
||||
.2T
|
37
tests/fixtures/sort/human-mixed-inputs-stable.expected
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs-stable.expected
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
-1.4
|
||||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
|
||||
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
0001
|
||||
1
|
||||
789----009999 90-0 90-0
|
||||
6780.000986
|
||||
6780.0009866
|
||||
56908-90078
|
||||
1890777
|
||||
51887300-
|
||||
7800900K
|
||||
100M
|
||||
2G
|
||||
.2T
|
37
tests/fixtures/sort/human-mixed-inputs-stable.txt
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs-stable.txt
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
0001
|
||||
|
||||
1
|
||||
|
||||
-1.4
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
1890777
|
||||
|
||||
56908-90078
|
||||
|
||||
51887300-
|
||||
|
||||
6780.0009866
|
||||
|
||||
789----009999 90-0 90-0
|
||||
|
||||
6780.000986
|
||||
|
||||
100M
|
||||
7800900K
|
||||
2G
|
||||
.2T
|
13
tests/fixtures/sort/human-mixed-inputs-unique.expected
vendored
Normal file
13
tests/fixtures/sort/human-mixed-inputs-unique.expected
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
-1.4
|
||||
JAN
|
||||
0001
|
||||
789----009999 90-0 90-0
|
||||
6780.000986
|
||||
6780.0009866
|
||||
56908-90078
|
||||
1890777
|
||||
51887300-
|
||||
7800900K
|
||||
100M
|
||||
2G
|
||||
.2T
|
37
tests/fixtures/sort/human-mixed-inputs-unique.txt
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs-unique.txt
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
0001
|
||||
|
||||
1
|
||||
|
||||
-1.4
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
1890777
|
||||
|
||||
56908-90078
|
||||
|
||||
51887300-
|
||||
|
||||
6780.0009866
|
||||
|
||||
789----009999 90-0 90-0
|
||||
|
||||
6780.000986
|
||||
|
||||
100M
|
||||
7800900K
|
||||
2G
|
||||
.2T
|
37
tests/fixtures/sort/human-mixed-inputs.expected
vendored
Normal file
37
tests/fixtures/sort/human-mixed-inputs.expected
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
-1.4
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
00
|
||||
0000000
|
||||
APR
|
||||
AUG
|
||||
JAN
|
||||
JUNNNN
|
||||
MAY
|
||||
apr
|
||||
0001
|
||||
1
|
||||
789----009999 90-0 90-0
|
||||
6780.000986
|
||||
6780.0009866
|
||||
56908-90078
|
||||
1890777
|
||||
51887300-
|
||||
7800900K
|
||||
100M
|
||||
2G
|
||||
.2T
|
46
tests/fixtures/sort/human-mixed-inputs.txt
vendored
Normal file
46
tests/fixtures/sort/human-mixed-inputs.txt
vendored
Normal file
|
@ -0,0 +1,46 @@
|
|||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
0001
|
||||
|
||||
1
|
||||
|
||||
-1.4
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
1890777
|
||||
|
||||
56908-90078
|
||||
|
||||
51887300-
|
||||
|
||||
6780.0009866
|
||||
|
||||
789----009999 90-0 90-0
|
||||
|
||||
6780.000986
|
||||
|
||||
1M
|
||||
10M
|
||||
100M
|
||||
1000M
|
||||
10000M
|
||||
|
||||
7800900K
|
||||
780090K
|
||||
78009K
|
||||
7800K
|
||||
780K
|
||||
2G
|
||||
.2T
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric.expected
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric.expected
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
-2028789030
|
||||
-896689
|
||||
-8.90880
|
||||
-1
|
||||
-.05
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
000
|
||||
CARAvan
|
||||
00000001
|
||||
1
|
||||
1.040000000
|
||||
1.444
|
||||
1.58590
|
||||
8.013
|
||||
45
|
||||
46.89
|
||||
4567.
|
||||
37800
|
||||
576,446.88800000
|
||||
576,446.890
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse.expected
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse.expected
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
4798908.8909800
|
||||
4798908.45
|
||||
4798908.340000000000
|
||||
576,446.890
|
||||
576,446.88800000
|
||||
37800
|
||||
4567.
|
||||
46.89
|
||||
45
|
||||
8.013
|
||||
1.58590
|
||||
1.444
|
||||
1.040000000
|
||||
1
|
||||
00000001
|
||||
CARAvan
|
||||
000
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-.05
|
||||
-1
|
||||
-8.90880
|
||||
-896689
|
||||
-2028789030
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse_stable.expected
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse_stable.expected
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
4798908.8909800
|
||||
4798908.45
|
||||
4798908.340000000000
|
||||
576,446.890
|
||||
576,446.88800000
|
||||
37800
|
||||
4567.
|
||||
46.89
|
||||
45
|
||||
8.013
|
||||
1.58590
|
||||
1.444
|
||||
1.040000000
|
||||
1
|
||||
00000001
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CARAvan
|
||||
|
||||
|
||||
|
||||
000
|
||||
-.05
|
||||
-1
|
||||
-8.90880
|
||||
-896689
|
||||
-2028789030
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse_stable.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_reverse_stable.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_stable.expected
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_stable.expected
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
-2028789030
|
||||
-896689
|
||||
-8.90880
|
||||
-1
|
||||
-.05
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CARAvan
|
||||
|
||||
|
||||
|
||||
000
|
||||
1
|
||||
00000001
|
||||
1.040000000
|
||||
1.444
|
||||
1.58590
|
||||
8.013
|
||||
45
|
||||
46.89
|
||||
4567.
|
||||
37800
|
||||
576,446.88800000
|
||||
576,446.890
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_stable.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_stable.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique.expected
vendored
Normal file
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique.expected
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
-2028789030
|
||||
-896689
|
||||
-8.90880
|
||||
-1
|
||||
-.05
|
||||
|
||||
1
|
||||
1.040000000
|
||||
1.444
|
||||
1.58590
|
||||
8.013
|
||||
45
|
||||
46.89
|
||||
4567.
|
||||
37800
|
||||
576,446.88800000
|
||||
576,446.890
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_reverse.expected
vendored
Normal file
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_reverse.expected
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
4798908.8909800
|
||||
4798908.45
|
||||
4798908.340000000000
|
||||
576,446.890
|
||||
576,446.88800000
|
||||
37800
|
||||
4567.
|
||||
46.89
|
||||
45
|
||||
8.013
|
||||
1.58590
|
||||
1.444
|
||||
1.040000000
|
||||
1
|
||||
|
||||
-.05
|
||||
-1
|
||||
-8.90880
|
||||
-896689
|
||||
-2028789030
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_reverse.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_reverse.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_stable.expected
vendored
Normal file
20
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_stable.expected
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
4798908.8909800
|
||||
4798908.45
|
||||
4798908.340000000000
|
||||
576,446.890
|
||||
576,446.88800000
|
||||
37800
|
||||
4567.
|
||||
46.89
|
||||
45
|
||||
8.013
|
||||
1.58590
|
||||
1.444
|
||||
1.040000000
|
||||
1
|
||||
|
||||
-.05
|
||||
-1
|
||||
-8.90880
|
||||
-896689
|
||||
-2028789030
|
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_stable.txt
vendored
Normal file
30
tests/fixtures/sort/mixed_floats_ints_chars_numeric_unique_stable.txt
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
576,446.890
|
||||
576,446.88800000
|
||||
|
||||
|
||||
4567.
|
||||
45
|
||||
46.89
|
||||
-1
|
||||
1
|
||||
00000001
|
||||
4798908.340000000000
|
||||
4798908.45
|
||||
4798908.8909800
|
||||
|
||||
|
||||
37800
|
||||
|
||||
-2028789030
|
||||
-896689
|
||||
CARAvan
|
||||
|
||||
-8.90880
|
||||
-.05
|
||||
1.444
|
||||
1.58590
|
||||
1.040000000
|
||||
|
||||
8.013
|
||||
|
||||
000
|
6
tests/fixtures/sort/months-dedup.expected
vendored
Normal file
6
tests/fixtures/sort/months-dedup.expected
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
JAN
|
||||
apr
|
||||
MAY
|
||||
JUNNNN
|
||||
AUG
|
37
tests/fixtures/sort/months-dedup.txt
vendored
Normal file
37
tests/fixtures/sort/months-dedup.txt
vendored
Normal file
|
@ -0,0 +1,37 @@
|
|||
JAN
|
||||
|
||||
0000000
|
||||
|
||||
00
|
||||
|
||||
0001
|
||||
|
||||
1
|
||||
|
||||
-1.4
|
||||
|
||||
JUNNNN
|
||||
AUG
|
||||
|
||||
apr
|
||||
|
||||
APR
|
||||
|
||||
|
||||
MAY
|
||||
1890777
|
||||
|
||||
56908-90078
|
||||
|
||||
51887300-
|
||||
|
||||
6780.0009866
|
||||
|
||||
789----009999 90-0 90-0
|
||||
|
||||
6780.000986
|
||||
|
||||
100M
|
||||
7800900K
|
||||
2G
|
||||
.2T
|
23
tests/fixtures/sort/numeric-floats-with-nan2.expected
vendored
Normal file
23
tests/fixtures/sort/numeric-floats-with-nan2.expected
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
-8.90880
|
||||
-.05
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Karma
|
||||
1
|
||||
1.0/0.0
|
||||
1.040000000
|
||||
1.2
|
||||
1.444
|
||||
1.58590
|
23
tests/fixtures/sort/numeric-floats-with-nan2.txt
vendored
Normal file
23
tests/fixtures/sort/numeric-floats-with-nan2.txt
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
Karma
|
||||
|
||||
1.0/0.0
|
||||
|
||||
|
||||
-8.90880
|
||||
|
||||
|
||||
-.05
|
||||
|
||||
|
||||
1.040000000
|
||||
|
||||
1.444
|
||||
|
||||
|
||||
1.58590
|
||||
|
||||
|
||||
1
|
||||
|
||||
1.2
|
||||
|
BIN
tests/fixtures/sort/zero-terminated.expected
vendored
Normal file
BIN
tests/fixtures/sort/zero-terminated.expected
vendored
Normal file
Binary file not shown.
BIN
tests/fixtures/sort/zero-terminated.txt
vendored
Normal file
BIN
tests/fixtures/sort/zero-terminated.txt
vendored
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue