diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2018-06-07 18:06:01 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2018-06-07 18:06:01 +0000 |
| commit | ce024bdc0c7e70c5bc32ddd2329ccd04ab747514 (patch) | |
| tree | 928a733e44113b7fbc4740dc93bbc255037fb1a7 | |
| parent | 943defc3a0fcfb3242f1d7af7314e715080d2807 (diff) | |
Notes
| -rwxr-xr-x | contrib/netbsd-tests/usr.bin/grep/t_grep.sh | 17 |
1 files changed, 17 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 6c221ebb0dba..9ac20e182f09 100755 --- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh +++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh @@ -716,6 +716,22 @@ fgrep_oflag_body() atf_check -s exit:1 grep -Fo "ghix" test1 atf_check -s exit:1 grep -Fo "abcdefghiklmnopqrstuvwxyz" test1 } + +atf_test_case cflag +cflag_head() +{ + atf_set "descr" "Check proper handling of -c" +} +cflag_body() +{ + printf "a\nb\nc\n" > test1 + + atf_check -o inline:"1\n" grep -Ec "a" test1 + atf_check -o inline:"2\n" grep -Ec "a|b" test1 + atf_check -o inline:"3\n" grep -Ec "a|b|c" test1 + + atf_check -o inline:"test1:2\n" grep -EHc "a|b" test1 +} # End FreeBSD atf_init_test_cases() @@ -759,5 +775,6 @@ atf_init_test_cases() atf_add_test_case fgrep_multipattern atf_add_test_case fgrep_icase atf_add_test_case fgrep_oflag + atf_add_test_case cflag # End FreeBSD } |
