aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/sort.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/sort.test b/tests/sort.test
index 7bd413f7..2845e79c 100755
--- a/tests/sort.test
+++ b/tests/sort.test
@@ -90,6 +90,12 @@ testing "sort key edge case with -t" "sort -n -k4 -t/" \
testing "sort -x" "sort -x" "010\na0\n 0c0\n" "" "a0\n010\n 0c0\n"
+# Test that -f applies to key or fallback independently
+
+testing "" "sort -k2,2f" "A b b\na B C\na B a\n" "" "a B a\nA b b\na B C\n"
+testing "" "sort -k2,2" "a B C\na B a\nA b b\n" "" "a B a\nA b b\na B C\n"
+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"
+
optional SORT_FLOAT
# not numbers < NaN < -infinity < numbers < +infinity