Changeset View
Changeset View
Standalone View
Standalone View
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
Show First 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
zgrep_body() | zgrep_body() | ||||
{ | { | ||||
cp "$(atf_get_srcdir)/d_input" . | cp "$(atf_get_srcdir)/d_input" . | ||||
gzip d_input || atf_fail "gzip failed" | gzip d_input || atf_fail "gzip failed" | ||||
atf_check -o file:"$(atf_get_srcdir)/d_zgrep.out" zgrep -h line d_input.gz | 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 </dev/null | |||||
} | |||||
atf_test_case nonexistent | atf_test_case nonexistent | ||||
nonexistent_head() | nonexistent_head() | ||||
{ | { | ||||
atf_set "descr" "Checks that -s flag suppresses error" \ | atf_set "descr" "Checks that -s flag suppresses error" \ | ||||
"messages about nonexistent files" | "messages about nonexistent files" | ||||
} | } | ||||
nonexistent_body() | nonexistent_body() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 596 Lines • ▼ Show 20 Lines | atf_init_test_cases() | ||||
atf_add_test_case ignore_case | atf_add_test_case ignore_case | ||||
atf_add_test_case invert | atf_add_test_case invert | ||||
atf_add_test_case whole_line | atf_add_test_case whole_line | ||||
atf_add_test_case negative | atf_add_test_case negative | ||||
atf_add_test_case context | atf_add_test_case context | ||||
atf_add_test_case file_exp | atf_add_test_case file_exp | ||||
atf_add_test_case egrep | atf_add_test_case egrep | ||||
atf_add_test_case zgrep | atf_add_test_case zgrep | ||||
atf_add_test_case zgrep_combined_flags | |||||
atf_add_test_case zgrep_fflag | |||||
atf_add_test_case nonexistent | atf_add_test_case nonexistent | ||||
atf_add_test_case context2 | atf_add_test_case context2 | ||||
# Begin FreeBSD | # Begin FreeBSD | ||||
atf_add_test_case oflag_zerolen | atf_add_test_case oflag_zerolen | ||||
atf_add_test_case xflag | atf_add_test_case xflag | ||||
atf_add_test_case color | atf_add_test_case color | ||||
atf_add_test_case f_file_empty | atf_add_test_case f_file_empty | ||||
atf_add_test_case escmap | atf_add_test_case escmap | ||||
Show All 23 Lines |