mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
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