Found by the differential fuzzer (fuzz/fuzz_targets/fuzz_sed.rs).
With --posix, GNU sed drops the GNU regular expression escapes: \?, \+,
\| are not operators and \w, \s are not classes, they all stand for the
plain character. We keep honoring them.
$ printf 'a\nb\n0?\n' | sed --posix -e '/a\+/d'
a
b
0?
$ printf 'a\nb\n0?\n' | ./target/release/sed --posix -e '/a\+/d'
b
0?
Same for the others:
| script |
GNU --posix deletes |
we delete |
/0\?/d |
0? |
every line (empty match) |
/a\+/d |
nothing |
a |
/a|b/d |
nothing |
a and b |
/\w/d |
nothing |
every line |
Until this is fixed the fuzzer skips these scenarios; see KNOWN_ISSUES in
fuzz/fuzz_targets/fuzz_sed.rs.
Found by the differential fuzzer (
fuzz/fuzz_targets/fuzz_sed.rs).With
--posix, GNU sed drops the GNU regular expression escapes:\?,\+,\|are not operators and\w,\sare not classes, they all stand for theplain character. We keep honoring them.
Same for the others:
--posixdeletes/0\?/d0?/a\+/da/a|b/daandb/\w/dUntil this is fixed the fuzzer skips these scenarios; see
KNOWN_ISSUESinfuzz/fuzz_targets/fuzz_sed.rs.