Files
coreutils/tests/csplit
Sylvestre Ledru 7b970665d8 tests: csplit: cover the trailing empty split
csplit always creates the split holding the remainder of the input,
even when the patterns have already consumed everything and that
split is therefore empty.  Two ways of reaching that state were not
exercised: a regexp with an offset that lands past the last line,
and --suppress-matched with a mix of a line number and a regexp
matching the last line.  Only the all-line-numbers case was covered.
identified here: https://github.com/uutils/coreutils/pull/14565

* tests/csplit/csplit.sh: Test an offset reaching past end of input,
with and without -z.
* tests/csplit/csplit-suppress-matched.pl (mixed-1, mixed-2): Test a
line number combined with a regexp matching the last line.

Link: https://github.com/coreutils/coreutils/pull/353
2026-09-15 13:09:29 +01:00
..