diff options
Diffstat (limited to 't/op/re_tests')
-rw-r--r-- | t/op/re_tests | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/t/op/re_tests b/t/op/re_tests index 77d97e2aeb..ce4c5a51a2 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -42,9 +42,9 @@ a[b-d]e ace y $& ace a[b-d] aac y $& ac a[-b] a- y $& a- a[b-] a- y $& a- -a[b-a] - c - - -a[]b - c - - -a[ - c - - +a[b-a] - c - /a[b-a]/: invalid [] range in regexp +a[]b - c - /a[]b/: unmatched [] in regexp +a[ - c - /a[/: unmatched [] in regexp a] a] y $& a] a[]]b a]b y $& a]b a[^bc]d aed y $& aed @@ -92,21 +92,21 @@ a[\S]b a-b y - - ab|cd abc y $& ab ab|cd abcd y $& ab ()ef def y $&-$1 ef- -*a - c - - -(*)b - c - - +*a - c - /*a/: ?+*{} follows nothing in regexp +(*)b - c - /(*)b/: ?+*{} follows nothing in regexp $b b n - - -a\ - c - - +a\ - c - Search pattern not terminated a\(b a(b y $&-$1 a(b- a\(*b ab y $& ab a\(*b a((b y $& a((b a\\b a\b y $& a\b -abc) - c - - -(abc - c - - +abc) - c - /abc)/: unmatched () in regexp +(abc - c - /(abc/: unmatched () in regexp ((a)) abc y $&-$1-$2 a-a-a (a)b(c) abc y $&-$1-$2 abc-a-c a+b+c aabbabc y $& abc a{1,}b{1,}c aabbabc y $& abc -a** - c - - +a** - c - /a**/: nested *?+ in regexp a.+?c abcabc y $& abc (a+|b)* ab y $&-$1 ab-b (a+|b){0,} ab y $&-$1 ab-b @@ -114,7 +114,7 @@ a.+?c abcabc y $& abc (a+|b){1,} ab y $&-$1 ab-b (a+|b)? ab y $&-$1 a-a (a+|b){0,1} ab y $&-$1 a-a -)( - c - - +)( - c - /)(/: unmatched () in regexp [^ab]* cde y $& cde abc n - - a* y $& @@ -205,9 +205,9 @@ a[-]?c ac y $& ac 'a[b-d]'i AAC y $& AC 'a[-b]'i A- y $& A- 'a[b-]'i A- y $& A- -'a[b-a]'i - c - - -'a[]b'i - c - - -'a['i - c - - +'a[b-a]'i - c - /a[b-a]/: invalid [] range in regexp +'a[]b'i - c - /a[]b/: unmatched [] in regexp +'a['i - c - /a[/: unmatched [] in regexp 'a]'i A] y $& A] 'a[]]b'i A]B y $& A]B 'a[^bc]d'i AED y $& AED @@ -219,21 +219,21 @@ a[-]?c ac y $& ac 'ab|cd'i ABC y $& AB 'ab|cd'i ABCD y $& AB '()ef'i DEF y $&-$1 EF- -'*a'i - c - - -'(*)b'i - c - - +'*a'i - c - /*a/: ?+*{} follows nothing in regexp +'(*)b'i - c - /(*)b/: ?+*{} follows nothing in regexp '$b'i B n - - -'a\'i - c - - +'a\'i - c - Search pattern not terminated 'a\(b'i A(B y $&-$1 A(B- 'a\(*b'i AB y $& AB 'a\(*b'i A((B y $& A((B 'a\\b'i A\B y $& A\B -'abc)'i - c - - -'(abc'i - c - - +'abc)'i - c - /abc)/: unmatched () in regexp +'(abc'i - c - /(abc/: unmatched () in regexp '((a))'i ABC y $&-$1-$2 A-A-A '(a)b(c)'i ABC y $&-$1-$2 ABC-A-C 'a+b+c'i AABBABC y $& ABC 'a{1,}b{1,}c'i AABBABC y $& ABC -'a**'i - c - - +'a**'i - c - /a**/: nested *?+ in regexp 'a.+?c'i ABCABC y $& ABC 'a.*?c'i ABCABC y $& ABC 'a.{0,5}?c'i ABCABC y $& ABC @@ -244,7 +244,7 @@ a[-]?c ac y $& ac '(a+|b)?'i AB y $&-$1 A-A '(a+|b){0,1}'i AB y $&-$1 A-A '(a+|b){0,1}?'i AB y $&-$1 - -')('i - c - - +')('i - c - /)(/: unmatched () in regexp '[^ab]*'i CDE y $& CDE 'abc'i n - - 'a*'i y $& @@ -304,3 +304,5 @@ a(?:b|(c|e){1,2}?|d)+?(.) ace y $1$2 ce '([a-z]+)\s\1'i Aa aa y $&-$1 Aa aa-Aa '([a-z]+)\s\1'i Ab ab y $&-$1 Ab ab-Ab foo\w*\d{4}baz foobar1234baz y $& foobar1234baz +((foo)|(bar))* foobar y $1-$2-$3 bar-foo-bar +:(?: - c - Sequence (? incomplete |