aboutsummaryrefslogtreecommitdiff
path: root/testsuite/sort.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-07 00:21:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-07 00:21:41 +0000
commit8336f080cb921a8c64c4cea59463363144e97c1d (patch)
tree107879fed239680db64187e43889648a79e71192 /testsuite/sort.tests
parent8a820b2732ec1672401cb5117437adcdc652b18b (diff)
downloadbusybox-w32-8336f080cb921a8c64c4cea59463363144e97c1d.tar.gz
busybox-w32-8336f080cb921a8c64c4cea59463363144e97c1d.tar.bz2
busybox-w32-8336f080cb921a8c64c4cea59463363144e97c1d.zip
diff: small optimizations; do not try to diff non-seekable stream
(currently we don't support that) sort: fixes. testsuites fixed: sort with non-default leading delim 1 sort with non-default leading delim 2 sort key doesn't strip leading blanks, disables fallback global sort
Diffstat (limited to 'testsuite/sort.tests')
-rwxr-xr-xtestsuite/sort.tests42
1 files changed, 31 insertions, 11 deletions
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index 5a4937b58..df5f7c7dd 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -66,18 +66,38 @@ testing "sort key range with multiple options" "sort -k2,3rn input" \
66egg 1 2 papyrus 66egg 1 2 papyrus
67" "$data" "" 67" "$data" ""
68 68
69testing "sort with non-default leading delim 1" "sort -n -k2 -t/ input" "\
70/a/2
71/b/1
72" "\
73/a/2
74/b/1
75" ""
76
77testing "sort with non-default leading delim 2" "sort -n -k3 -t/ input" "\
78/b/1
79/a/2
80" "\
81/b/1
82/a/2
83" ""
84
85testing "sort with non-default leading delim 3" "sort -n -k3 -t/ input" "\
86//a/2
87//b/1
88" "\
89//a/2
90//b/1
91" ""
92
93testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\
94a c
95" "\
96a c
97b c
98" ""
99
69testing "sort key doesn't strip leading blanks, disables fallback global sort" \ 100testing "sort key doesn't strip leading blanks, disables fallback global sort" \
70"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n" 101"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"
71 102
72testing "sort key edge case with -t" "sort -n -k4 -t/" \
73"/usr/lib/finish-install.d/1
74/usr/lib/finish-install.d/4
75/usr/lib/prebaseconfig.d/2
76/usr/lib/prebaseconfig.d/6
77" "" "/usr/lib/finish-install.d/1
78/usr/lib/prebaseconfig.d/2
79/usr/lib/finish-install.d/4
80/usr/lib/prebaseconfig.d/6
81"
82
83exit $FAILCOUNT 103exit $FAILCOUNT