diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 14:44:51 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-19 14:44:51 +0200 |
commit | 2e86a5c98d8cc716844eb0084adc5849a12cf0c7 (patch) | |
tree | 66a08bc73bc4d755e9e71028e459cc2401dabe2c /testsuite | |
parent | 3d0805e9e7c45e6c0f9fb5e587d8b4a5a5f3c74c (diff) | |
download | busybox-w32-2e86a5c98d8cc716844eb0084adc5849a12cf0c7.tar.gz busybox-w32-2e86a5c98d8cc716844eb0084adc5849a12cf0c7.tar.bz2 busybox-w32-2e86a5c98d8cc716844eb0084adc5849a12cf0c7.zip |
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-x | testsuite/sort.tests | 36 |
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 | |||
106 | a:b | 106 | a:b |
107 | " "" | 107 | " "" |
108 | 108 | ||
109 | testing "glibc build sort" "sort -t. -k 1,1 -k 2n,2n -k 3 input" "\ | ||
110 | GLIBC_2.1 | ||
111 | GLIBC_2.1.1 | ||
112 | GLIBC_2.2 | ||
113 | GLIBC_2.2.1 | ||
114 | GLIBC_2.10 | ||
115 | GLIBC_2.20 | ||
116 | GLIBC_2.21 | ||
117 | " "\ | ||
118 | GLIBC_2.21 | ||
119 | GLIBC_2.1.1 | ||
120 | GLIBC_2.2.1 | ||
121 | GLIBC_2.2 | ||
122 | GLIBC_2.20 | ||
123 | GLIBC_2.10 | ||
124 | GLIBC_2.1 | ||
125 | " "" | ||
126 | |||
127 | testing "glibc build sort unique" "sort -u -t. -k 1,1 -k 2n,2n -k 3 input" "\ | ||
128 | GLIBC_2.1 | ||
129 | GLIBC_2.1.1 | ||
130 | GLIBC_2.2 | ||
131 | GLIBC_2.2.1 | ||
132 | GLIBC_2.10 | ||
133 | GLIBC_2.20 | ||
134 | GLIBC_2.21 | ||
135 | " "\ | ||
136 | GLIBC_2.10 | ||
137 | GLIBC_2.2.1 | ||
138 | GLIBC_2.1.1 | ||
139 | GLIBC_2.20 | ||
140 | GLIBC_2.2 | ||
141 | GLIBC_2.1 | ||
142 | GLIBC_2.21 | ||
143 | " "" | ||
144 | |||
109 | testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\ | 145 | testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\ |
110 | a c | 146 | a c |
111 | " "\ | 147 | " "\ |