aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-04 01:29:52 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-04 01:29:52 +0200
commitbf5f99ffb245e9039df62e5d3f77674fd7b3b2a7 (patch)
tree4e10b657ca0be2ec90d06442c45872db55fca41d /testsuite
parent79b3d42e13814f984ec35ec632d34db301871567 (diff)
downloadbusybox-bf5f99ffb245e9039df62e5d3f77674fd7b3b2a7.tar.gz
sed: fix a case when one-line range matches past lines. Closes bug 1867.
function old new delta process_files 2096 2107 +11 add_cmd 1142 1132 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 11/-10) Total: 1 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sed.tests5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 88b9c4e4b..3301a25f8 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -270,6 +270,11 @@ testing "sed a cmd ended by double backslash" \
| two \\
'
+# fisrt three lines are deleted; 4th line is matched and printed by "2,3" and by "4" ranges
+testing "sed with N skipping lines past ranges on next cmds" \
+ "sed -n '1{N;N;d};1p;2,3p;3p;4p'" \
+ "4\n4\n" "" "1\n2\n3\n4\n"
+
# testing "description" "arguments" "result" "infile" "stdin"
exit $FAILCOUNT