]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
bsdgrep: don't ouptut matches with -c, -l, -L
authorEd Maste <emaste@FreeBSD.org>
Fri, 5 May 2017 17:35:05 +0000 (17:35 +0000)
committerEd Maste <emaste@FreeBSD.org>
Fri, 5 May 2017 17:35:05 +0000 (17:35 +0000)
commite2127de812b4143c20ac1968c55035e5a19f98f5
tree9d7cc1de76c7b2128825db083b9a788ac9890f96
parente6c0d5c360d927ce09fd4a8bc70a7fc884d02613
bsdgrep: don't ouptut matches with -c, -l, -L

Refactoring done in r317703 broke -c, -l, and -L flags implying
suppression of match printing.  Fortunately this is just a matter of not
doing any printing of the resulting matches and context printing was not
broken in this refactoring.

Add some regression tests since this area may still see further
refactoring, include different context flags as well even though they
were not broken in this case.

PR: 219077
Submitted by: Kyle kevans91@ksu.edu
Reported by: markj
Reviewed by: cem, ngie
Differential Revision: https://reviews.freebsd.org/D10607
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
usr.bin/grep/util.c