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' -" \
"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
"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"