summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libc/regex/tests17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/regress/lib/libc/regex/tests b/src/regress/lib/libc/regex/tests
index f400b8575b..f3fd9d0e6b 100644
--- a/src/regress/lib/libc/regex/tests
+++ b/src/regress/lib/libc/regex/tests
@@ -1,4 +1,4 @@
1# $OpenBSD: tests,v 1.9 2020/12/28 21:41:55 millert Exp $ 1# $OpenBSD: tests,v 1.10 2021/04/02 14:20:57 otto Exp $
2# $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $ 2# $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $
3 3
4# regular expression test set 4# regular expression test set
@@ -595,3 +595,18 @@ a?b - ab ab
595# FreeBSD PR 130504 595# FreeBSD PR 130504
596(.|())(b) - ab ab 596(.|())(b) - ab ab
597(()|.)(b) - ab ab 597(()|.)(b) - ab ab
598
599# Some BRE cases where \{0,\} makes a backref go wrong, as reported by Michael Paoli
600Y*\(x\)\1 b YYxx YYxx
601Y\{2,\}\(x\)\1 b YYxx YYxx
602# Fails currently
603#Y\{0,\}\(x\)\1 b YYxx YYxx
604Y\{0,\}\(x\) b YYxx YYx
605Y\{2,\}x\{1,\} b YYxx YYxx
606Y\{2,\}x\{0,\}z b YYxxz YYxxz
607Y\{0,\}x\{0,\}z b YYxxz YYxxz
608Y\{2,\}\(xy\)\1 b YYxyxy YYxyxy
609# Fails currently
610#Y\{0,\}\(xy\)\1 b YYxyxy YYxyxy
611Y*\(xy\)\1 b YYxyxy YYxyxy
612Y\{0,\}\(xy\)xy b YYxyxy YYxyxy