aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-01-24 15:52:16 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-01-24 15:52:16 +0100
commit2a4bba3ce2e00e55e6690fa8ba2607679277eed4 (patch)
treee26381d4a648bb3834272b02849602ff240d1d78 /testsuite
parenteb5091070f6876993d868d2b2bb49b4b4d3ed002 (diff)
downloadbusybox-2a4bba3ce2e00e55e6690fa8ba2607679277eed4.tar.gz
sed: make 's///w FILE' actually write to FILE. Closes 8251
function old new delta add_cmd 1167 1210 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/sed.tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/sed.tests b/testsuite/sed.tests
index 34479e55f..5d2356b64 100755
--- a/testsuite/sed.tests
+++ b/testsuite/sed.tests
@@ -365,6 +365,12 @@ testing "sed /regex/,+0<cmd> -i works" \
"1\n2\n3\n4\n5\n6\n7\n8\n" \
"1\n2\n4\n5\n6\n7\n8\n" \
+testing "sed 's///w FILE'" \
+ "sed 's/qwe/ZZZ/wz'; cat z; rm z" \
+ "123\nZZZ\nasd\n""ZZZ\n" \
+ "" \
+ "123\nqwe\nasd\n"
+
# testing "description" "commands" "result" "infile" "stdin"
exit $FAILCOUNT