diff options
| author | otto <> | 2004-04-02 18:35:54 +0000 |
|---|---|---|
| committer | otto <> | 2004-04-02 18:35:54 +0000 |
| commit | 0f7a7a16350ac3506332ec3f9dd6a120902f01f6 (patch) | |
| tree | b9cb8f68d7843a5f3b6acfaa9db9e71265a6c4c6 /src/regress/lib/libc/regex/tests | |
| parent | 8fcf616fc089002b1b804fc9fe84b0c79e2b4f2e (diff) | |
| download | openbsd-0f7a7a16350ac3506332ec3f9dd6a120902f01f6.tar.gz openbsd-0f7a7a16350ac3506332ec3f9dd6a120902f01f6.tar.bz2 openbsd-0f7a7a16350ac3506332ec3f9dd6a120902f01f6.zip | |
Some nasty test cases involving back references that caused
unbounded recursion.
Diffstat (limited to 'src/regress/lib/libc/regex/tests')
| -rw-r--r-- | src/regress/lib/libc/regex/tests | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/regress/lib/libc/regex/tests b/src/regress/lib/libc/regex/tests index c89b9ec164..3c1a51f8b4 100644 --- a/src/regress/lib/libc/regex/tests +++ b/src/regress/lib/libc/regex/tests | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: tests,v 1.2 2001/01/29 02:05:44 niklas Exp $ | 1 | # $OpenBSD: tests,v 1.3 2004/04/02 18:35:54 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,6 +169,10 @@ 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 "" | ||
| 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 | ||
| 175 | \([^_]*\)\(_*\1\)* b foo_bar_baz foo foo | ||
| 172 | 176 | ||
| 173 | # ordinary repetitions | 177 | # ordinary repetitions |
| 174 | ab*c & abc abc | 178 | ab*c & abc abc |
| @@ -476,3 +480,4 @@ CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a - CC11 CC11 | |||
| 476 | Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz | 480 | Char \([a-z0-9_]*\)\[.* b Char xyz[k Char xyz[k xyz |
| 477 | a?b - ab ab | 481 | a?b - ab ab |
| 478 | -\{0,1\}[0-9]*$ b -5 -5 | 482 | -\{0,1\}[0-9]*$ b -5 -5 |
| 483 | |||
