sed: fix 2 bugs (one testsuite entry + one newly found)

but more importantly make code more understandable
This commit is contained in:
Denis Vlasenko
2007-01-29 14:31:47 +00:00
parent 826c85f382
commit fe7a9f1277
2 changed files with 63 additions and 59 deletions

View File

@@ -139,6 +139,10 @@ testing "sed selective matches noinsert newline" \
testing "sed clusternewline" \
"sed -e '/one/a 111' -e '/two/i 222' -e p input -" \
"one\none\n111\n222\ntwo\ntwo" "one" "two"
testing "sed subst+write" \
"sed -e 's/i/z/' -e 'woutputw' input -; echo -n X; cat outputw" \
"thzngy\nagaznXthzngy\nagazn" "thingy" "again"
rm outputw
# Test end-of-file matching behavior