summaryrefslogtreecommitdiffhomepage
path: root/testsuite
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-06-15 20:50:38 +0000
committerRob Landley <rob@landley.net>2006-06-15 20:50:38 +0000
commit39218932b1e99be6ef91329f7fb1beeeb40941c1 (patch)
treea2228860af517eefd8787a739e01d00b4062e587 /testsuite
parentcd82c3c041139c03fceea7e76fb48280b00d73da (diff)
Fix bug found by Joey Hess and forwarded by Bastian Bunk. Add Joey Hess's
test case to the testsuite, plus another one that would have been broken by the first attempt at a fix.
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sort.tests16
1 files changed, 15 insertions, 1 deletions
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index d1b42532d..cd2e291b2 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# SUSv3 compliant sort tests.
# Copyright 2005 by Rob Landley <rob@landley.net>
@@ -66,4 +66,18 @@ testing "sort key range with multiple options" "sort -k2,3rn input" \
egg 1 2 papyrus
" "$data" ""
+testing "sort key doesn't strip leading blanks, disables fallback global sort" \
+"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"
+
+testing "sort key edge case with -t" "sort -n -k4 -t/" \
+"/usr/lib/finish-install.d/1
+/usr/lib/finish-install.d/4
+/usr/lib/prebaseconfig.d/2
+/usr/lib/prebaseconfig.d/6
+" "" "/usr/lib/finish-install.d/1
+/usr/lib/prebaseconfig.d/2
+/usr/lib/finish-install.d/4
+/usr/lib/prebaseconfig.d/6
+"
+
exit $FAILCOUNT