[Bug 195763] bsdgrep, empty matches and -o

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Jan 21 02:43:11 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195763

Kyle Evans <bsdports at kyle-evans.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #179126|0                           |1
        is obsolete|                            |

--- Comment #3 from Kyle Evans <bsdports at kyle-evans.net> ---
Created attachment 179171
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=179171&action=edit
Proposed patch to address line matching issues

emaste@ - I believe this to be my final iteration of this patch. Because this
and bug #209116 are both somewhat major issues with procline(), this patch
addresses both PRs and obsoletes both previous patches.

I've added to printline() a bail-out if -o and matchall (empty pattern) are set
-- this coincides with GNU grep's behavior.

Assuming I ran the tests correctly (make && make install && kyua test -k
/usr/tests/usr.bin/grep/Kyuafile), I haven't yet introduced any regressions
there. One of my next steps might be to review the unit test coverage and make
sure it's sufficient, though, since it was passing before despite having all
kinds of problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list