aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2015-10-19 14:44:51 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2015-10-19 14:44:51 +0200
commit2e86a5c98d8cc716844eb0084adc5849a12cf0c7 (patch)
tree66a08bc73bc4d755e9e71028e459cc2401dabe2c /testsuite
parent3d0805e9e7c45e6c0f9fb5e587d8b4a5a5f3c74c (diff)
downloadbusybox-2e86a5c98d8cc716844eb0084adc5849a12cf0c7.tar.gz
sort: fix key with delimiters breakage
function old new delta get_key 509 505 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sort.tests36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index c4b223464..39c7af738 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -106,6 +106,42 @@ a/a:a
a:b
" ""
+testing "glibc build sort" "sort -t. -k 1,1 -k 2n,2n -k 3 input" "\
+GLIBC_2.1
+GLIBC_2.1.1
+GLIBC_2.2
+GLIBC_2.2.1
+GLIBC_2.10
+GLIBC_2.20
+GLIBC_2.21
+" "\
+GLIBC_2.21
+GLIBC_2.1.1
+GLIBC_2.2.1
+GLIBC_2.2
+GLIBC_2.20
+GLIBC_2.10
+GLIBC_2.1
+" ""
+
+testing "glibc build sort unique" "sort -u -t. -k 1,1 -k 2n,2n -k 3 input" "\
+GLIBC_2.1
+GLIBC_2.1.1
+GLIBC_2.2
+GLIBC_2.2.1
+GLIBC_2.10
+GLIBC_2.20
+GLIBC_2.21
+" "\
+GLIBC_2.10
+GLIBC_2.2.1
+GLIBC_2.1.1
+GLIBC_2.20
+GLIBC_2.2
+GLIBC_2.1
+GLIBC_2.21
+" ""
+
testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\
a c
" "\