aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-15 12:38:32 -0600
committerRob Landley <rob@landley.net>2016-01-15 12:38:32 -0600
commit7ca907824d6f8a5017c3d914d0028a3d50ea619a (patch)
tree3f1e71c1f9259ae51f288bd8886b9c8ba38cdcdd /tests
parent7d4d0421b8e57bd6d9a9cb3dee04130b43bc53a0 (diff)
downloadtoybox-7ca907824d6f8a5017c3d914d0028a3d50ea619a.tar.gz
Fix sort -f, add tests, make TEST_HOST pass new tests.
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