summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko2007-02-17 18:11:45 +0000
committerDenis Vlasenko2007-02-17 18:11:45 +0000
commit54cf511ce1286ce46f04e4cead085b4af829f179 (patch)
treea43331e67e2472f7a8c415aee09ce17137d734a6 /testsuite
parentec27feb04589d46233802f686559fb5f532fb2df (diff)
downloadbusybox-54cf511ce1286ce46f04e4cead085b4af829f179.zip
busybox-54cf511ce1286ce46f04e4cead085b4af829f179.tar.gz
sort: fix multiple -k (was ignoring all except last)
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sort.tests10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index df5f7c7..1db7870 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -66,6 +66,16 @@ testing "sort key range with multiple options" "sort -k2,3rn input" \
egg 1 2 papyrus
" "$data" ""
+testing "sort key range with two -k options" "sort -k 2,2n -k 1,1r input" "\
+d 2
+b 2
+c 3
+" "\
+c 3
+b 2
+d 2
+" ""
+
testing "sort with non-default leading delim 1" "sort -n -k2 -t/ input" "\
/a/2
/b/1