Index: contrib/netbsd-tests/usr.bin/grep/t_grep.sh =================================================================== --- contrib/netbsd-tests/usr.bin/grep/t_grep.sh (revision 362521) +++ contrib/netbsd-tests/usr.bin/grep/t_grep.sh (working copy) @@ -214,6 +214,32 @@ atf_check -o file:"$(atf_get_srcdir)/d_zgrep.out" zgrep -h line d_input.gz } +atf_test_case zgrep_combined_flags +zgrep_combined_flags_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with combined flags (PR 247126)" +} +zgrep_combined_flags_body() +{ + echo 'foo bar' > test + + atf_check -o inline:"foo bar\n" zgrep -we foo test +} + +atf_test_case zgrep_fflag +zgrep_fflag_head() +{ + atf_set "descr" "Checks for zgrep wrapper problems with -f FILE (PR 247126)" +} +zgrep_fflag_body() +{ + echo foo > pattern + echo foobar > test + + # Avoid hang on reading from stdin in the failure case + atf_check -o inline:"foobar\n" zgrep -f pattern test