aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sed.tests9
-rwxr-xr-xtestsuite/sort.tests42
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.
410testing "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
410exit $FAILCOUNT 419exit $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" \
175111 175111
176" "" 176" ""
177 177
178testing "sort -sr (stable and reverse) does NOT reverse 'stable' ordering" \
179"sort -k2 -r -s input" "\
180b 2
181d 2
182a 1
183c 1
184" "\
185a 1
186b 2
187c 1
188d 2
189" ""
190
191testing "sort -h" \
192"sort -h input" "\
1933e
1944m
1955y
1961023
1971024
1981025
1993000
2002K
2013k
2021M
2032E
2041Y
205" "\
2061Y
2075y
2081M
2092E
2103k
2113e
2122K
2134m
2141023
2151025
2163000
2171024
218" ""
219
178# testing "description" "command(s)" "result" "infile" "stdin" 220# testing "description" "command(s)" "result" "infile" "stdin"
179 221
180exit $FAILCOUNT 222exit $FAILCOUNT