From f2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 6 May 2016 18:25:56 +0200 Subject: sed: fix append command to match GNU sed 4.2.1 This closes one testcase failure Signed-off-by: Denys Vlasenko --- testsuite/sed.tests | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'testsuite') diff --git a/testsuite/sed.tests b/testsuite/sed.tests index c4b6fa278..a71f8b1f0 100755 --- a/testsuite/sed.tests +++ b/testsuite/sed.tests @@ -135,10 +135,12 @@ testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \ "" "one\ntwo" testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \ "one\ntwo" "" -test x"$SKIP_KNOWN_BUGS" = x"" && { testing "sed append autoinserts newline" "sed -e '/woot/a woo' -" \ "woot\nwoo\n" "" "woot" -} +testing "sed append autoinserts newline 2" "sed -e '/oot/a woo' - input" \ + "woot\nwoo\nboot\nwoo\n" "boot" "woot" +testing "sed append autoinserts newline 3" "sed -e '/oot/a woo' -i input && cat input" \ + "boot\nwoo\n" "boot" "" testing "sed insert doesn't autoinsert newline" "sed -e '/woot/i woo' -" \ "woo\nwoot" "" "woot" testing "sed print autoinsert newlines" "sed -e 'p' -" "one\none" "" "one" -- cgit v1.2.3