aboutsummaryrefslogtreecommitdiff
path: root/testsuite/sed.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-28 17:59:01 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-28 17:59:01 +0000
commitf39c7c0c86d9f263f372be7c305bffa51af3c21e (patch)
tree2cc58af337e3c01d04ad27126a890422af2283f6 /testsuite/sed.tests
parentcd174d1f31632884b717eba69048d338605e7e70 (diff)
downloadbusybox-f39c7c0c86d9f263f372be7c305bffa51af3c21e.tar.gz
sed: n cmd must reset "we had successful subst" flag. closes bug 1214.
Diffstat (limited to 'testsuite/sed.tests')
-rwxr-xr-xtestsuite/sed.tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 7471ed5fc..4cdbaa687 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -201,4 +201,10 @@ testing "sed s/xxx/[/" "sed -e 's/xxx/[/'" "[\n" "" "xxx\n"
#testing "sed -g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5," \
# "" "12345"
+# testing "description" "arguments" "result" "infile" "stdin"
+
+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"
+
exit $FAILCOUNT