From deb3ed0a579dadbd6cca7ef2e7fb10148387a1ca Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 9 Mar 2017 15:42:32 +0300 Subject: Add support for in place editing for sed builtin --- tests/test/script/builtin/sed.test | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test/script/builtin/sed.test b/tests/test/script/builtin/sed.test index c0a8172..dbd70c4 100644 --- a/tests/test/script/builtin/sed.test +++ b/tests/test/script/builtin/sed.test @@ -104,7 +104,6 @@ info: stderr: test/1/stderr sed: unexpected argument EOE - } : command @@ -299,6 +298,26 @@ } } +: in-place +: +{ + : no-file + : + $c <"sed -i -e 's/a/b/'" && $b 2>>/EOE != 0 + testscript:1:1: error: sed exit status 1 != 0 + info: stderr: test/1/stderr + sed: -i option specified while reading from stdin + EOE + + : edit + : + $c <=f; + sed -i -e 's/foo/bar/' f; + cat f >'bar' + EOI +} + : big : : Sed a big file (about 100K) to test that the builtin is asynchronous. -- cgit v1.1