zgrep should exit with success when given multiple files and the
pattern is found in at least one file. Prior to this change,
it would exit with success only if the pattern was found in _every_ file.
Details
Details
- Reviewers
leres kevans ngie dab - Commits
- rS366345: zgrep: fix exit status with multiple files
The added test case failed before the fix. All tests pass with the fix.
grep_test:zgrep_multiple_files -> passed [0.022s] Results file id is usr_tests_usr.bin_grep.20200930-212653-629287 Results saved to /root/.kyua/store/results.usr_tests_usr.bin_grep.20200930-212653-629287.db 52/52 passed (0 failed)
Diff Detail
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 33908 Build 31109: arc lint + arc unit
Event Timeline
Comment Actions
contrib/netbsd-tests/usr.bin/grep/t_grep.sh | ||
---|---|---|
898 | "Ensures that zgrep functions properly with multiple files" would be a better comment. |
contrib/netbsd-tests/usr.bin/grep/t_grep.sh | ||
---|---|---|
898 | Indeed, it would. (I'm guilty of copy-and-paste.) |