aboutsummaryrefslogtreecommitdiff
path: root/tests/sed.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-12-14 13:51:28 -0600
committerRob Landley <rob@landley.net>2014-12-14 13:51:28 -0600
commit807a50d89976e2de081d487a54e8e109d49f0a6d (patch)
treeb3cac87669ab535e80d7ff1359f15a2a04582da9 /tests/sed.test
parent2c23705ab0e3038f0b5bfd3af742d07a3383ed54 (diff)
downloadtoybox-807a50d89976e2de081d487a54e8e109d49f0a6d.tar.gz
Make sed a\ line continuations work properly for different pattern input modes.
Diffstat (limited to 'tests/sed.test')
-rw-r--r--tests/sed.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/sed.test b/tests/sed.test
index 86738854..789a1a51 100644
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -119,6 +119,17 @@ testing "sed D further processing depends on whether line is blank" \
"sed -e '/one/,/three/{' -e 'i meep' -e'N;2D;}'" \
"meep\nmeep\ntwo\nthree\n" "" "one\ntwo\nthree\n"
+# Different ways of parsing line continuations
+
+testing "" "sed -e '1a\' -e 'huh'" "meep\nhuh\n" "" "meep"
+testing "" "sed -f input" "blah\nboom\n" '1a\\\nboom' 'blah'
+testing "" "sed '1a\
+hello'" "merp\nhello\n" "" "merp"
+#echo meep | sed/sed -e '1a\' -e 'huh'
+#echo blah | sed/sed -f <(echo -e "1a\\\\\nboom")
+#echo merp | sed/sed "1a\\
+#hello"
+
# -i with $ last line test
exit $FAILCOUNT