]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
csplit(1): Fix extraneous output in edge case
authorConrad Meyer <cem@FreeBSD.org>
Mon, 8 May 2017 15:51:29 +0000 (15:51 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Mon, 8 May 2017 15:51:29 +0000 (15:51 +0000)
commit48b644192d73be11d54b4b3dcfe255bd1b47884d
treecb7f4ddee28edef640cbfb3987d85745dd8bfcd3
parentf83d9358c25cad8091cb7f19dc19b4a01a0c4a08
csplit(1): Fix extraneous output in edge case

When the input to csplit contains fewer lines than the number of matches
specified, extra output was mistakenly included in some output files.

Fix the bug and add a simple ATF regression test.

PR: 219024
Submitted by: J.R. Oldroyd <fbsd at opal.com>
usr.bin/csplit/Makefile
usr.bin/csplit/csplit.c
usr.bin/csplit/tests/Makefile [new file with mode: 0644]
usr.bin/csplit/tests/csplit_test.sh [new file with mode: 0755]