[Toybox] [PATCH] csplit.c: Test cases, started fixing regressions
Oliver Webb
aquahobbyist at proton.me
Sun Mar 17 15:36:01 PDT 2024
For the last few days I've been looking at csplit again, trying to get tests
implemented. I added about a dozen in the attached patch, did catch a handful
regressions I didn't notice when I was making this (was manually testing
because I didn't know how to use the test suite), so I guess it's doing it's job?
There are some insane trailing newline shenanigans, csplit doesn't print a trailing newline
only on the last line of the last file, which is.... Certainly behavior, also certainly
annoying to get working around a REPL. I got it working with the side effect of %exclude%
rules still not working because the trailing newline printing mechanism and the rule processing
logic do NOT like each other. Delay processing was also broken for /regex/ rules, so I fixed that.
In any event, csplit.c with this patch applied is considerably better than without. It's a start and I
have more debugging work which I'll do. But I've already spent a few days on this and have fixed more
regressions then are still left.
- Oliver Webb <aquahobbyist at proton.me>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-csplit-Test-suite-newline-shenanigans-fixed-some-of-.patch
Type: text/x-patch
Size: 6996 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20240317/df06937e/attachment.bin>
More information about the Toybox
mailing list