aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-11-15 16:16:29 -0600
committerRob Landley <rob@landley.net>2014-11-15 16:16:29 -0600
commit0c558f09d9d714244847b0473f7ecda6b12c2ab4 (patch)
treeb49fcb7ff0785c9831a80901f1c42133842e840f /tests
parent1d5f48f3c195fbd9907cbbf89250c3a5ba6c4389 (diff)
downloadtoybox-0c558f09d9d714244847b0473f7ecda6b12c2ab4.tar.gz
Debugging pass on sed: make the existing test suite pass.
Diffstat (limited to 'tests')
-rw-r--r--tests/sed.test6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/sed.test b/tests/sed.test
index 7ac5e887..2d019eb9 100644
--- a/tests/sed.test
+++ b/tests/sed.test
@@ -76,9 +76,11 @@ testing 'sed \1 p no newline' "sed 's/t\\(w\\)o/za\\1py/p'" \
testing 'sed -n s//\1/p' "sed -n 's/t\\(w\\)o/za\\1py/p'" "zawpy" "" "one\ntwo"
testing 'sed -n s//\1/p no newline' "sed -n 's/t\\(w\\)o/za\\1py/p'" "zawpy" \
"" "one\ntwo"
-testing 'sed backref error' "sed 's/w/ale \2 ha/' 2>/dev/null || echo no" \
+testing 'sed backref error' \
+ "sed 's/w/ale \2 ha/' >/dev/null 2>/dev/null || echo no" \
"no\n" "" "one\ntwo\nthree"
testing 'sed empty match after nonempty match' "sed -e 's/a*/c/g'" 'cbcncgc' \
'' 'baaang'
testing 'sed empty match' "sed -e 's/[^ac]*/A/g'" 'AaAcA' '' 'abcde'
-
+testing 'sed s///#' "sed -e 's/TWO/four/i#comment'" "one\nfour\nthree" \
+ "" "one\ntwo\nthree"