diff --git a/contrib/netbsd-tests/usr.bin/grep/d_color_d.out b/contrib/netbsd-tests/usr.bin/grep/d_color_d.out new file mode 100644 index 00000000000000..a9ce473965ea10 --- /dev/null +++ b/contrib/netbsd-tests/usr.bin/grep/d_color_d.out @@ -0,0 +1 @@ +foobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobarfoobar diff --git a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh index b1412a7a0715b9..ab6b33198bd1c3 100755 --- a/contrib/netbsd-tests/usr.bin/grep/t_grep.sh +++ b/contrib/netbsd-tests/usr.bin/grep/t_grep.sh @@ -426,6 +426,13 @@ color_body() atf_check -o file:"$(atf_get_srcdir)/d_color_c.out" \ grep --color=always -f grepfile "$(atf_get_srcdir)/d_color_b.in" + + # Begin FreeBSD + MAX_MATCHES=32 + for _ in $(seq $((MAX_MATCHES + 1))); do printf "foobar"; done > grepfile + atf_check -o file:"$(atf_get_srcdir)/d_color_d.out" \ + grep --color=always foo grepfile + # End FreeBSD } atf_test_case f_file_empty diff --git a/usr.bin/grep/tests/Makefile b/usr.bin/grep/tests/Makefile index b3c79657e53c9e..1db5ebea5c6280 100644 --- a/usr.bin/grep/tests/Makefile +++ b/usr.bin/grep/tests/Makefile @@ -12,6 +12,7 @@ ${PACKAGE}FILES+= d_color_a.out ${PACKAGE}FILES+= d_color_b.in ${PACKAGE}FILES+= d_color_b.out ${PACKAGE}FILES+= d_color_c.out +${PACKAGE}FILES+= d_color_d.out ${PACKAGE}FILES+= d_context2_a.out ${PACKAGE}FILES+= d_context2_b.out ${PACKAGE}FILES+= d_context2_c.out