Home | History | Annotate | Download | only in tests

Lines Matching full:sort

3 # SUSv4 compliant sort tests.
10 testing "sort" "sort input" "a\nb\nc\n" "c\na\nb\n" ""
11 testing "sort #2" "sort input" "010\n1\n3\n" "3\n1\n010\n" ""
12 testing "sort stdin" "sort" "a\nb\nc\n" "" "b\na\nc\n"
13 testing "sort numeric" "sort -n input" "1\n3\n010\n" "3\n1\n010\n" ""
14 testing "sort reverse" "sort -r input" "wook\nwalrus\npoint\npabst\naargh\n" \
32 testing "sort one key" "sort -k4,4 input" \
40 # The numeric sort orders field 2, ignores field 3 (because numeric sort stops
41 # at the whitespace), then the global fallback sort does an alpha sort on
44 testing "sort key range with numeric option" "sort -k2,3n input" \
52 # Numeric sort on field 2 (again, ignore field 3 because it's numeric),
53 # then do a _reversed_ alpha sort on the whole line as a tiebreaker.
55 testing "sort key range with numeric option and global reverse" \
56 "sort -k2,3n -r input" \
64 # Reversed numeric sort on field 2 (numeric ignores field 3), then
65 # break ties with alpha sort on whole line.
67 testing "sort key range with multiple options" "sort -k2,3rn input" \
75 testing "sort key doesn't strip leading blanks, disables fallback global sort" \
76 "sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"
80 testing "sort key edge case with -t" "sort -n -k4 -t/" \
91 testing "sort -x" "sort -x" "010\na0\n 0c0\n" "" "a0\n010\n 0c0\n"
95 testing "" "sort -k2,2f" "A b b\na B C\na B a\n" "" "a B a\nA b b\na B C\n"
96 testing "" "sort -k2,2" "a B C\na B a\nA b b\n" "" "a B a\nA b b\na B C\n"
97 testing "" "sort -f -k2,2" "A b b\na B C\na B a\n" "" "a B a\nA b b\na B C\n"
102 testing "sort -g" "sort -g" \