summaryrefslogtreecommitdiff
path: root/regress/lib/libc
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2021-04-02 14:20:58 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2021-04-02 14:20:58 +0000
commit14d49feaac444ca04ad9866f8f8f2a55d752ed04 (patch)
tree0ba5ad6be5d77ba897787d749ec0b9cc7039ef68 /regress/lib/libc
parent88e560bde2e6094948bbb3572fecdb03f0dd3068 (diff)
Two cases of BRE involving counts and backrefs that go wrong and
similar that have no isssues. Reported by Michael Paoli. Failing cases commented out for now.
Diffstat (limited to 'regress/lib/libc')
-rw-r--r--regress/lib/libc/regex/tests17
1 files changed, 16 insertions, 1 deletions
diff --git a/regress/lib/libc/regex/tests b/regress/lib/libc/regex/tests
index f400b8575b7..f3fd9d0e6b7 100644
--- a/regress/lib/libc/regex/tests
+++ b/regress/lib/libc/regex/tests
@@ -1,4 +1,4 @@
-# $OpenBSD: tests,v 1.9 2020/12/28 21:41:55 millert Exp $
+# $OpenBSD: tests,v 1.10 2021/04/02 14:20:57 otto Exp $
# $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $
# regular expression test set
@@ -595,3 +595,18 @@ a?b - ab ab
# FreeBSD PR 130504
(.|())(b) - ab ab
(()|.)(b) - ab ab
+
+# Some BRE cases where \{0,\} makes a backref go wrong, as reported by Michael Paoli
+Y*\(x\)\1 b YYxx YYxx
+Y\{2,\}\(x\)\1 b YYxx YYxx
+# Fails currently
+#Y\{0,\}\(x\)\1 b YYxx YYxx
+Y\{0,\}\(x\) b YYxx YYx
+Y\{2,\}x\{1,\} b YYxx YYxx
+Y\{2,\}x\{0,\}z b YYxxz YYxxz
+Y\{0,\}x\{0,\}z b YYxxz YYxxz
+Y\{2,\}\(xy\)\1 b YYxyxy YYxyxy
+# Fails currently
+#Y\{0,\}\(xy\)\1 b YYxyxy YYxyxy
+Y*\(xy\)\1 b YYxyxy YYxyxy
+Y\{0,\}\(xy\)xy b YYxyxy YYxyxy