ifupdown: save some 100+ bytes of code in addstr()
[oweals/busybox.git] / testsuite / sed.tests
index 4d6e2e67eb5a1d7613876db7ff7c7c16ea348be7..2a0d4eacfcfe91da21d79624aeab9e5eab255fae 100755 (executable)
@@ -116,7 +116,7 @@ testing "sed leave off trailing newline" "sed -e 's/woo/bang/' input -" \
 testing "sed autoinsert newline" "sed -e 's/woo/bang/' input -" "bang\nbang" \
        "woo" "woo"
 testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \
-       "" "one\ntwo" 
+       "" "one\ntwo"
 testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \
        "one\ntwo" ""
 testing "sed append autoinserts newline" "sed -e '/woot/a woo' -" \
@@ -138,7 +138,7 @@ testing "sed selective matches noinsert newline" \
        "c no\nd no"
 testing "sed clusternewline" \
        "sed -e '/one/a 111' -e '/two/i 222' -e p input -" \
-       "one\none\n111\n222\ntwo\ntwo" "one" "two" 
+       "one\none\n111\n222\ntwo\ntwo" "one" "two"
 
 # Test end-of-file matching behavior
 
@@ -174,6 +174,8 @@ testing "sed -i with no arg [GNUFAIL]" "sed -e '' -i 2> /dev/null || echo yes" \
        "yes\n" "" ""
 rm ./-     # Clean up
 
+testing "sed s/xxx/[/" "sed -e 's/xxx/[/'" "[\n" "" "xxx\n"
+
 # Ponder this a bit more, why "woo not found" from gnu version?
 #testing "sed doesn't substitute in deleted line" \
 #      "sed -e '/ook/d;s/ook//;t woo;a bang;'" "bang" "" "ook\n"