summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorotto <>2004-11-29 16:50:31 +0000
committerotto <>2004-11-29 16:50:31 +0000
commit21edc335077ec883a751979cb9a75e07da6677a0 (patch)
treeee987cd3a89e188a6fe8936a615119b4bfc700d8
parent400dc0ede1161c72451b91080bb9b92c97ec449e (diff)
downloadopenbsd-21edc335077ec883a751979cb9a75e07da6677a0.tar.gz
openbsd-21edc335077ec883a751979cb9a75e07da6677a0.tar.bz2
openbsd-21edc335077ec883a751979cb9a75e07da6677a0.zip
More test cases involving back-references.
-rw-r--r--src/regress/lib/libc/regex/tests14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/regress/lib/libc/regex/tests b/src/regress/lib/libc/regex/tests
index 9398ae4803..c827c868b7 100644
--- a/src/regress/lib/libc/regex/tests
+++ b/src/regress/lib/libc/regex/tests
@@ -1,4 +1,4 @@
1# $OpenBSD: tests,v 1.4 2004/08/13 07:21:40 otto Exp $ 1# $OpenBSD: tests,v 1.5 2004/11/29 16:50:31 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
@@ -169,7 +169,7 @@ a\(\(b\)*\2\)*d b abbbd abbbd
169\(a\)\1bc*d b aabcccd aabcccd 169\(a\)\1bc*d b aabcccd aabcccd
170\(a\)\1bc*[ce]d b aabcccd aabcccd 170\(a\)\1bc*[ce]d b aabcccd aabcccd
171^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd 171^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd
172\(b*\)\(a*\1\)* b ab "" 172\(b*\)\(a*\1\)* b ab a
173\([^_]*\)\(_*\1\)* b foo_foo_bar_bar_bar_baz foo_foo foo,_foo 173\([^_]*\)\(_*\1\)* b foo_foo_bar_bar_bar_baz foo_foo foo,_foo
174\([^_]*\)\(_*\1\)* b bar_bar_bar_baz bar_bar_bar bar,_bar 174\([^_]*\)\(_*\1\)* b bar_bar_bar_baz bar_bar_bar bar,_bar
175\([^_]*\)\(_*\1\)* b foo_bar_baz foo foo 175\([^_]*\)\(_*\1\)* b foo_bar_baz foo foo
@@ -183,6 +183,16 @@ a\(\(b\)*\2\)*d b abbbd abbbd
183\([^_]*\)\1 b aa aa 183\([^_]*\)\1 b aa aa
184\([^_]*\)\1 b aaa aa 184\([^_]*\)\1 b aaa aa
185\([^_]*\)\1 b aaaa aaaa 185\([^_]*\)\1 b aaaa aaaa
186foo\(.*\)bar\1 b foolbarl foolbarl l
187foo\(.*\)bar\1 b foobar foobar ""
188\(\(.\)b\)*\1 b aba
189\(\(.\)b\)*\1 b abba
190\(\(.\)b\)*\1 b abbba
191\(\(.\)b\)*\1 b abbbba bbbb bb,b
192\(\(.\)b\)*\1 b abbbbba abbbbb bb,b
193\(\(.\)b\)*\1 b abbbbbba abbbbb bb,b
194\(\(.\)b\)*\1 b abbbbbbbbbbbbbba abbbbbbbbbbbbb bb,b
195\(\(.\)b\)*\1 b abbbbbbbbbbbbbbba abbbbbbbbbbbbbbb bb,b
186 196
187# ordinary repetitions 197# ordinary repetitions
188ab*c & abc abc 198ab*c & abc abc