aboutsummaryrefslogtreecommitdiff
path: root/testsuite/sed.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-30 19:19:37 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-30 19:19:37 +0200
commit8bca3e20b9c057e9144af27870ca3905f1e5d316 (patch)
treec5472b7e8dfdbd847810ba833d5f69e5de327ccc /testsuite/sed.tests
parentf1fab0924285cca27903a1e4a4498c7205810742 (diff)
downloadbusybox-8bca3e20b9c057e9144af27870ca3905f1e5d316.tar.gz
sed: fix handling of 1d;1,3p and 1d;1,REGEXp
function old new delta process_files 2084 2173 +89 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/sed.tests')
-rwxr-xr-xtestsuite/sed.tests13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 9a7f886c1..8af156ae9 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -207,4 +207,17 @@ testing "sed n command must reset 'substituted' bit" \
"sed 's/1/x/;T;n;: next;s/3/y/;t quit;n;b next;: quit;q'" \
"0\nx\n2\ny\n" "" "0\n1\n2\n3\n"
+testing "sed d does not break n,m matching" \
+ "sed -n '1d;1,3p'" \
+ "second\nthird\n" "" "first\nsecond\nthird\nfourth\n"
+
+testing "sed d does not break n,regex matching" \
+ "sed -n '1d;1,/hir/p'" \
+ "second\nthird\n" "" "first\nsecond\nthird\nfourth\n"
+
+testing "sed d does not break n,regex matching #2" \
+ "sed -n '1,5d;1,/hir/p'" \
+ "second2\nthird2\n" "" \
+ "first\nsecond\nthird\nfourth\n""first2\nsecond2\nthird2\nfourth2\n"
+
exit $FAILCOUNT