[BusyBox] [patch] Another bad sed testcase.
rob at landley.net
Wed Oct 1 04:20:34 UTC 2003
"testsuite/sed/sed-requires-newline-after-edit-command" is failing, and it
boils down to:
echo "a" | sed -e 'i\foo'
Which under gnu sed produces:
While busybox produces:
A slightly more interesting test case is:
$ echo "a" | sed -e 'i\f\noo\' -e "boo\nthing"
$ echo "a" | ./busybox sed -e 'i\f\noo\' -e "boo\nthing"
Which shows that gnu is just filtering out all backslashes in the text
argument to an append/insert/replace command. (It's not even turning \n into
a newline.) But it turns out, this is what the spec actually calls for!
The argument text shall consist of one or more lines. Each embedded <newline>
in the text shall be preceded by a backslash. Other backslashes in text shall
be removed, and the following character shall be treated literally.
Boggles the mind! (Told you I needed to finish reading the spec.) Patch
With this patch, we now produce what gnu sed does, but the testcase is still
complaining. Can we fix the testcase?
Just backrefs left to go...
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 724 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20030930/02e81043/attachment.bin
More information about the busybox