Rich Filker spotted that sed -e 's/xxx/[/' didn't work right. Did a smaller

fix than his, and shrank the code a bit on top of that so the net size is
smaller, and added a test to the test suite for this case.  Plus I cleaned up
the #includes and removed unnecessary "const"s while I was there.
This commit is contained in:
Rob Landley
2006-07-26 17:25:08 +00:00
parent 7cc6b69bb0
commit 4795e4e011
2 changed files with 25 additions and 35 deletions

View File

@@ -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"