Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/grep/tests/grep_freebsd_test.sh
| Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | color_dupe_body() | ||||
| # meaning we'd see the line be output again for the next MAX_MATCHES | # meaning we'd see the line be output again for the next MAX_MATCHES | ||||
| # number of matches. | # number of matches. | ||||
| jot -nb 'A' -s '' 33 > in | jot -nb 'A' -s '' 33 > in | ||||
| atf_check -o save:color.out grep --color=always . in | atf_check -o save:color.out grep --color=always . in | ||||
| atf_check -o match:"^ +1 color.out" wc -l color.out | atf_check -o match:"^ +1 color.out" wc -l color.out | ||||
| } | } | ||||
| atf_test_case qflag | |||||
| qflag_body() | |||||
| { | |||||
| # Test whitespace in argument | |||||
| printf "1 2 3 4\n5 6 7 8\n" > in | |||||
| atf_check zgrep -q '1 2' in | |||||
| } | |||||
| atf_init_test_cases() | atf_init_test_cases() | ||||
| { | { | ||||
| atf_add_test_case grep_r_implied | atf_add_test_case grep_r_implied | ||||
| atf_add_test_case rgrep | atf_add_test_case rgrep | ||||
| atf_add_test_case gnuext | atf_add_test_case gnuext | ||||
| atf_add_test_case zflag | atf_add_test_case zflag | ||||
| atf_add_test_case color_dupe | atf_add_test_case color_dupe | ||||
| atf_add_test_case qflag | |||||
| } | } | ||||