diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-03-09 15:42:32 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-03-15 19:52:39 +0300 |
commit | deb3ed0a579dadbd6cca7ef2e7fb10148387a1ca (patch) | |
tree | cf3f0cb4bc68408f391e9c7436fb317c883f48ea /tests/test/script/builtin | |
parent | 52a29dd64479e9313848941078a2619b47f2c61b (diff) |
Add support for in place editing for sed builtin
Diffstat (limited to 'tests/test/script/builtin')
-rw-r--r-- | tests/test/script/builtin/sed.test | 21 |
1 files changed, 20 insertions, 1 deletions
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 <<EOI && $b + cat <'foo' >=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. |