diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-11-29 16:50:32 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-11-29 16:50:32 +0000 |
commit | e8e707bd754b6d2d69f1c9aa28b322e022cf23d4 (patch) | |
tree | 97e698779a184c629ee1bdf878bc6cba6805e9bc /regress/lib | |
parent | a494cb0e535d3ae604c2b399492693e1770ea660 (diff) |
More test cases involving back-references.
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libc/regex/tests | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/regress/lib/libc/regex/tests b/regress/lib/libc/regex/tests index 9398ae48033..c827c868b78 100644 --- a/regress/lib/libc/regex/tests +++ b/regress/lib/libc/regex/tests @@ -1,4 +1,4 @@ -# $OpenBSD: tests,v 1.4 2004/08/13 07:21:40 otto Exp $ +# $OpenBSD: tests,v 1.5 2004/11/29 16:50:31 otto Exp $ # $NetBSD: tests,v 1.5 1995/04/20 22:40:00 cgd Exp $ # regular expression test set @@ -169,7 +169,7 @@ a\(\(b\)*\2\)*d b abbbd abbbd \(a\)\1bc*d b aabcccd aabcccd \(a\)\1bc*[ce]d b aabcccd aabcccd ^\(a\)\1b\(c\)*cd$ b aabcccd aabcccd -\(b*\)\(a*\1\)* b ab "" +\(b*\)\(a*\1\)* b ab a \([^_]*\)\(_*\1\)* b foo_foo_bar_bar_bar_baz foo_foo foo,_foo \([^_]*\)\(_*\1\)* b bar_bar_bar_baz bar_bar_bar bar,_bar \([^_]*\)\(_*\1\)* b foo_bar_baz foo foo @@ -183,6 +183,16 @@ a\(\(b\)*\2\)*d b abbbd abbbd \([^_]*\)\1 b aa aa \([^_]*\)\1 b aaa aa \([^_]*\)\1 b aaaa aaaa +foo\(.*\)bar\1 b foolbarl foolbarl l +foo\(.*\)bar\1 b foobar foobar "" +\(\(.\)b\)*\1 b aba +\(\(.\)b\)*\1 b abba +\(\(.\)b\)*\1 b abbba +\(\(.\)b\)*\1 b abbbba bbbb bb,b +\(\(.\)b\)*\1 b abbbbba abbbbb bb,b +\(\(.\)b\)*\1 b abbbbbba abbbbb bb,b +\(\(.\)b\)*\1 b abbbbbbbbbbbbbba abbbbbbbbbbbbb bb,b +\(\(.\)b\)*\1 b abbbbbbbbbbbbbbba abbbbbbbbbbbbbbb bb,b # ordinary repetitions ab*c & abc abc |