diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2017-05-02 02:32:10 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2017-05-02 02:32:10 +0000 |
| commit | 945fc991b2dc3385fb2a91cd0189b074ca1fad63 (patch) | |
| tree | 342c645afa4954e93dcd07a93003ffa082b1b5a7 /contrib | |
| parent | df5be97c1aec5b18feec87eb06c1e11de7ac2b14 (diff) | |
Notes
Diffstat (limited to 'contrib')
| -rwxr-xr-x | contrib/netbsd-tests/usr.bin/grep/t_grep.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh index 0d0e99f6e1d0..3a6f489c17fa 100755 --- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh +++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh @@ -93,6 +93,12 @@ word_regexps_body() { atf_check -o file:"$(atf_get_srcdir)/d_word_regexps.out" \ grep -w separated $(atf_get_srcdir)/d_input + + # Begin FreeBSD + printf "xmatch pmatch\n" > test1 + + atf_check -o inline:"pmatch\n" grep -Eow "(match )?pmatch" test1 + # End FreeBSD } atf_test_case begin_end @@ -439,6 +445,23 @@ grep_sanity_body() atf_check -o inline:"M\n" grep -o -e "M\{1\}" test2 } + +atf_test_case wv_combo_break +wv_combo_break_head() +{ + atf_set "descr" "Check for incorrectly matching lines with both -w and -v flags (PR 218467)" +} +wv_combo_break_body() +{ + printf "x xx\n" > test1 + printf "xx x\n" > test2 + + atf_check -o file:test1 grep -w "x" test1 + atf_check -o file:test2 grep -w "x" test2 + + atf_check -s exit:1 grep -v -w "x" test1 + atf_check -s exit:1 grep -v -w "x" test2 +} # End FreeBSD atf_init_test_cases() @@ -467,6 +490,7 @@ atf_init_test_cases() atf_add_test_case escmap atf_add_test_case egrep_empty_invalid atf_add_test_case zerolen + atf_add_test_case wv_combo_break atf_add_test_case fgrep_sanity atf_add_test_case egrep_sanity atf_add_test_case grep_sanity |
