diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/sed.tests | 9 | ||||
-rwxr-xr-x | testsuite/sort.tests | 42 |
2 files changed, 51 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests index 2b78c9b12..e62b839f7 100755 --- a/testsuite/sed.tests +++ b/testsuite/sed.tests | |||
@@ -405,6 +405,15 @@ testing "sed ^ OR not^" \ | |||
405 | "" \ | 405 | "" \ |
406 | "abca\n" | 406 | "abca\n" |
407 | 407 | ||
408 | # This only works if file name is exactly the same. | ||
409 | # For example, w FILE; w ./FILE won't work. | ||
410 | testing "sed understands duplicate file name" \ | ||
411 | "sed -n -e '/a/w sed.output' -e '/c/w sed.output' 2>&1 && cat sed.output && rm sed.output" \ | ||
412 | "a\nc\n" \ | ||
413 | "" \ | ||
414 | "a\nb\nc\n" | ||
415 | |||
416 | |||
408 | # testing "description" "commands" "result" "infile" "stdin" | 417 | # testing "description" "commands" "result" "infile" "stdin" |
409 | 418 | ||
410 | exit $FAILCOUNT | 419 | exit $FAILCOUNT |
diff --git a/testsuite/sort.tests b/testsuite/sort.tests index c51a8e475..ff33e21b4 100755 --- a/testsuite/sort.tests +++ b/testsuite/sort.tests | |||
@@ -175,6 +175,48 @@ testing "sort file in place" \ | |||
175 | 111 | 175 | 111 |
176 | " "" | 176 | " "" |
177 | 177 | ||
178 | testing "sort -sr (stable and reverse) does NOT reverse 'stable' ordering" \ | ||
179 | "sort -k2 -r -s input" "\ | ||
180 | b 2 | ||
181 | d 2 | ||
182 | a 1 | ||
183 | c 1 | ||
184 | " "\ | ||
185 | a 1 | ||
186 | b 2 | ||
187 | c 1 | ||
188 | d 2 | ||
189 | " "" | ||
190 | |||
191 | testing "sort -h" \ | ||
192 | "sort -h input" "\ | ||
193 | 3e | ||
194 | 4m | ||
195 | 5y | ||
196 | 1023 | ||
197 | 1024 | ||
198 | 1025 | ||
199 | 3000 | ||
200 | 2K | ||
201 | 3k | ||
202 | 1M | ||
203 | 2E | ||
204 | 1Y | ||
205 | " "\ | ||
206 | 1Y | ||
207 | 5y | ||
208 | 1M | ||
209 | 2E | ||
210 | 3k | ||
211 | 3e | ||
212 | 2K | ||
213 | 4m | ||
214 | 1023 | ||
215 | 1025 | ||
216 | 3000 | ||
217 | 1024 | ||
218 | " "" | ||
219 | |||
178 | # testing "description" "command(s)" "result" "infile" "stdin" | 220 | # testing "description" "command(s)" "result" "infile" "stdin" |
179 | 221 | ||
180 | exit $FAILCOUNT | 222 | exit $FAILCOUNT |