diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-05-07 19:10:07 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-05-07 19:10:07 +0000 |
commit | 803d89c90099d562082b1baaf27f2412aad700ac (patch) | |
tree | 45ced9fbcefb6a35a9f3fd4f4f7183f1b82d70be | |
parent | 6fc86aa950e91afb7752710554577d8c1c798b07 (diff) |
Regression tests for fgrep -w and grep -w. Also enable a few tests that
were defined, but not called.
-rw-r--r-- | regress/usr.bin/grep/Makefile | 29 | ||||
-rw-r--r-- | regress/usr.bin/grep/t19.in | 6 | ||||
-rw-r--r-- | regress/usr.bin/grep/t19.out | 2 |
3 files changed, 34 insertions, 3 deletions
diff --git a/regress/usr.bin/grep/Makefile b/regress/usr.bin/grep/Makefile index 544f6dc8cbd..2398dfdae01 100644 --- a/regress/usr.bin/grep/Makefile +++ b/regress/usr.bin/grep/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.9 2004/02/04 05:53:49 millert Exp $ +# $OpenBSD: Makefile,v 1.10 2004/05/07 19:10:06 otto Exp $ -REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 +REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 \ + t18 t19 t20 t1: grep t.s ${.CURDIR}/in | diff - ${.CURDIR}/t1.out @@ -56,6 +57,28 @@ t17: t18: grep -w '^foo$$' ${.CURDIR}/t17.in | diff - ${.CURDIR}/t17.out -.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 +t19: + grep -w 'a.' ${.CURDIR}/t19.in | diff - ${.CURDIR}/t19.out + fgrep -w -e 'aa' -e 'a_' ${.CURDIR}/t19.in | diff - ${.CURDIR}/t19.out + +t20: + echo '=' | grep -w '=' | diff - /dev/null + echo '=' | fgrep -w '=' | diff - /dev/null + echo 'a=' | grep -w 'a=' | diff - /dev/null + echo 'a=' | fgrep -w 'a=' | diff - /dev/null + echo '=b' | grep -w '=b' | diff - /dev/null + echo '=b' | fgrep -w '=b' | diff - /dev/null + echo 'a=b' | grep -qw 'a=b' + echo 'a=b' | fgrep -qw 'a=b' + echo '+' | grep -w '+' | diff - /dev/null + echo '+' | fgrep -w '+' | diff - /dev/null + echo 'a+' | grep -w 'a+' | diff - /dev/null + echo 'a+' | fgrep -w 'a+' | diff - /dev/null + echo '+b' | grep -w '+b' | diff - /dev/null + echo '+b' | fgrep -w '+b' | diff - /dev/null + echo 'a+b' | grep -qw 'a+b' + echo 'a+b' | fgrep -qw 'a+b' + +.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 .include <bsd.regress.mk> diff --git a/regress/usr.bin/grep/t19.in b/regress/usr.bin/grep/t19.in new file mode 100644 index 00000000000..21d93d7af6e --- /dev/null +++ b/regress/usr.bin/grep/t19.in @@ -0,0 +1,6 @@ + +a +aa +a_ +a+ ++a diff --git a/regress/usr.bin/grep/t19.out b/regress/usr.bin/grep/t19.out new file mode 100644 index 00000000000..c4b1315419d --- /dev/null +++ b/regress/usr.bin/grep/t19.out @@ -0,0 +1,2 @@ +aa +a_ |