summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2003-12-06 20:19:12 +0000
committerotto <otto@openbsd.org>2003-12-06 20:19:12 +0000
commit05886afeea9e79cf1ad285bb2d5271a2cf6ad93b (patch)
tree150e30a8bbfe0357ce241fa1c7d02c05a378a358
parentUnbreak grepping for some patterns containing multiple dots. Fixes PR 3597. (diff)
downloadwireguard-openbsd-05886afeea9e79cf1ad285bb2d5271a2cf6ad93b.tar.xz
wireguard-openbsd-05886afeea9e79cf1ad285bb2d5271a2cf6ad93b.zip
Add test for pattern containing multiple dots (PR 3597).
-rw-r--r--regress/usr.bin/grep/Makefile9
-rw-r--r--regress/usr.bin/grep/t13.in24
-rw-r--r--regress/usr.bin/grep/t13.out24
3 files changed, 54 insertions, 3 deletions
diff --git a/regress/usr.bin/grep/Makefile b/regress/usr.bin/grep/Makefile
index b0bc5762f4b..34afaebd963 100644
--- a/regress/usr.bin/grep/Makefile
+++ b/regress/usr.bin/grep/Makefile
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile,v 1.4 2003/07/17 19:14:43 pvalchev Exp $
+# $OpenBSD: Makefile,v 1.5 2003/12/06 20:19:12 otto Exp $
-REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
+REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13
t1:
grep t.s ${.CURDIR}/in | diff - ${.CURDIR}/t1.out
@@ -38,6 +38,9 @@ t11:
t12:
egrep -f ${.CURDIR}/t1.out ${.CURDIR}/in | diff - ${.CURDIR}/t1.out
-.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12
+t13:
+ grep 'abcd. abcd.' ${.CURDIR}/t13.in | diff - ${.CURDIR}/t13.out
+
+.PHONY: t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13
.include <bsd.regress.mk>
diff --git a/regress/usr.bin/grep/t13.in b/regress/usr.bin/grep/t13.in
new file mode 100644
index 00000000000..48885a449a0
--- /dev/null
+++ b/regress/usr.bin/grep/t13.in
@@ -0,0 +1,24 @@
+abcd abcd
+abcd abcd 1
+abcd abcd 22
+abcd abcd 333
+abcd abcd 4444
+abcd abcd 55555
+abcd abcd 666666
+abcd abcd 7777777
+abcd abcd 88888888
+abcd abcd 999999999
+abcd abcd 0000000000
+abcd abcd 11111111111
+abcd abcd 222222222222
+abcd abcd 3333333333333
+abcd abcd 44444444444444
+abcd abcd 555555555555555
+abcd abcd 6666666666666666
+abcd abcd 77777777777777777
+abcd abcd 888888888888888888
+abcd abcd 9999999999999999999
+abcd abcd 00000000000000000000
+abcd abcd 111111111111111111111
+abcd abcd 2222222222222222222222
+abcd abcd 33333333333333333333333
diff --git a/regress/usr.bin/grep/t13.out b/regress/usr.bin/grep/t13.out
new file mode 100644
index 00000000000..48885a449a0
--- /dev/null
+++ b/regress/usr.bin/grep/t13.out
@@ -0,0 +1,24 @@
+abcd abcd
+abcd abcd 1
+abcd abcd 22
+abcd abcd 333
+abcd abcd 4444
+abcd abcd 55555
+abcd abcd 666666
+abcd abcd 7777777
+abcd abcd 88888888
+abcd abcd 999999999
+abcd abcd 0000000000
+abcd abcd 11111111111
+abcd abcd 222222222222
+abcd abcd 3333333333333
+abcd abcd 44444444444444
+abcd abcd 555555555555555
+abcd abcd 6666666666666666
+abcd abcd 77777777777777777
+abcd abcd 888888888888888888
+abcd abcd 9999999999999999999
+abcd abcd 00000000000000000000
+abcd abcd 111111111111111111111
+abcd abcd 2222222222222222222222
+abcd abcd 33333333333333333333333