split: add some tests
This should cover all of the basic functionality, as well as the recent
enhancement to use a dynamic buffer size rather than limiting patterns
and lines to MAXBSIZE.
Reviewed by: bapt
Sponsored by: Klara, Inc.
(cherry picked from commit 75c3ca1ebf81224919f2b7a9edf2921ce76ea290)