version 1.1.1.1, 2012/02/21 23:05:52
|
version 1.1.1.4, 2013/07/22 08:25:57
|
Line 1
|
Line 1
|
/-- This set of tests checks UTF-8 support with the DFA matching functionality | /-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). |
of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running | The -dfa flag must be used with pcretest when running it. --/ |
it. --/ | |
| /abc/ |
/\x{100}ab/8 | abc |
\x{100}ab | |
| |
/a\x{100}*b/8 | |
ab | |
a\x{100}b | |
a\x{100}\x{100}b | |
|
|
/a\x{100}+b/8 | /ab*c/ |
a\x{100}b | abc |
a\x{100}\x{100}b | abbbbc |
| ac |
| |
| /ab+c/ |
| abc |
| abbbbbbc |
*** Failers |
*** Failers |
|
ac |
ab |
ab |
| |
/\bX/8 | /a*/ |
Xoanon | a |
+Xoanon | aaaaaaaaaaaaaaaaa |
\x{300}Xoanon | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\F |
| |
| /(a|abcd|african)/ |
| a |
| abcd |
| african |
| |
| /^abc/ |
| abcdef |
| *** Failers |
| xyzabc |
| xyz\nabc |
| |
| /^abc/m |
| abcdef |
| xyz\nabc |
| *** Failers |
| xyzabc |
| |
| /\Aabc/ |
| abcdef |
| *** Failers |
| xyzabc |
| xyz\nabc |
| |
| /\Aabc/m |
| abcdef |
| *** Failers |
| xyzabc |
| xyz\nabc |
| |
| /\Gabc/ |
| abcdef |
| xyzabc\>3 |
| *** Failers |
| xyzabc |
| xyzabc\>2 |
| |
| /x\dy\Dz/ |
| x9yzz |
| x0y+z |
| *** Failers |
| xyz |
| xxy0z |
| |
| /x\sy\Sz/ |
| x yzz |
| x y+z |
| *** Failers |
| xyz |
| xxyyz |
| |
| /x\wy\Wz/ |
| xxy+z |
| *** Failers |
| xxy0z |
| x+y+z |
| |
| /x.y/ |
| x+y |
| x-y |
| *** Failers |
| x\ny |
| |
| /x.y/s |
| x+y |
| x-y |
| x\ny |
| |
| /(a.b(?s)c.d|x.y)p.q/ |
| a+bc+dp+q |
| a+bc\ndp+q |
| x\nyp+q |
*** Failers |
*** Failers |
YXoanon | a\nbc\ndp+q |
| a+bc\ndp\nq |
| x\nyp\nq |
| |
| /a\d\z/ |
| ba0 |
| *** Failers |
| ba0\n |
| ba0\ncd |
| |
| /a\d\z/m |
| ba0 |
| *** Failers |
| ba0\n |
| ba0\ncd |
| |
| /a\d\Z/ |
| ba0 |
| ba0\n |
| *** Failers |
| ba0\ncd |
| |
| /a\d\Z/m |
| ba0 |
| ba0\n |
| *** Failers |
| ba0\ncd |
| |
| /a\d$/ |
| ba0 |
| ba0\n |
| *** Failers |
| ba0\ncd |
| |
| /a\d$/m |
| ba0 |
| ba0\n |
| ba0\ncd |
| *** Failers |
| |
| /abc/i |
| abc |
| aBc |
| ABC |
|
|
/\BX/8 | /[^a]/ |
YXoanon | abcd |
| |
| /ab?\w/ |
| abz |
| abbz |
| azz |
| |
| /x{0,3}yz/ |
| ayzq |
| axyzq |
| axxyz |
| axxxyzq |
| axxxxyzq |
*** Failers |
*** Failers |
Xoanon | ax |
+Xoanon | axx |
\x{300}Xoanon | |
| /x{3}yz/ |
| axxxyzq |
| axxxxyzq |
| *** Failers |
| ax |
| axx |
| ayzq |
| axyzq |
| axxyz |
| |
| /x{2,3}yz/ |
| axxyz |
| axxxyzq |
| axxxxyzq |
| *** Failers |
| ax |
| axx |
| ayzq |
| axyzq |
| |
| /[^a]+/ |
| bac |
| bcdefax |
| *** Failers |
| aaaaa |
|
|
/X\b/8 | /[^a]*/ |
X+oanon | bac |
ZX\x{300}oanon | bcdefax |
FAX | *** Failers |
| aaaaa |
| |
| /[^a]{3,5}/ |
| xyz |
| awxyza |
| abcdefa |
| abcdefghijk |
| *** Failers |
| axya |
| axa |
| aaaaa |
| |
| /\d*/ |
| 1234b567 |
| xyz |
| |
| /\D*/ |
| a1234b567 |
| xyz |
| |
| /\d+/ |
| ab1234c56 |
| *** Failers |
| xyz |
| |
| /\D+/ |
| ab123c56 |
| *** Failers |
| 789 |
| |
| /\d?A/ |
| 045ABC |
| ABC |
| *** Failers |
| XYZ |
| |
| /\D?A/ |
| ABC |
| BAC |
| 9ABC |
| *** Failers |
| |
| /a+/ |
| aaaa |
| |
| /^.*xyz/ |
| xyz |
| ggggggggxyz |
| |
| /^.+xyz/ |
| abcdxyz |
| axyz |
| *** Failers |
| xyz |
| |
| /^.?xyz/ |
| xyz |
| cxyz |
| |
| /^\d{2,3}X/ |
| 12X |
| 123X |
| *** Failers |
| X |
| 1X |
| 1234X |
| |
| /^[abcd]\d/ |
| a45 |
| b93 |
| c99z |
| d04 |
| *** Failers |
| e45 |
| abcd |
| abcd1234 |
| 1234 |
| |
| /^[abcd]*\d/ |
| a45 |
| b93 |
| c99z |
| d04 |
| abcd1234 |
| 1234 |
| *** Failers |
| e45 |
| abcd |
| |
| /^[abcd]+\d/ |
| a45 |
| b93 |
| c99z |
| d04 |
| abcd1234 |
| *** Failers |
| 1234 |
| e45 |
| abcd |
| |
| /^a+X/ |
| aX |
| aaX |
| |
| /^[abcd]?\d/ |
| a45 |
| b93 |
| c99z |
| d04 |
| 1234 |
| *** Failers |
| abcd1234 |
| e45 |
| |
| /^[abcd]{2,3}\d/ |
| ab45 |
| bcd93 |
| *** Failers |
| 1234 |
| a36 |
| abcd1234 |
| ee45 |
| |
| /^(abc)*\d/ |
| abc45 |
| abcabcabc45 |
| 42xyz |
| *** Failers |
| |
| /^(abc)+\d/ |
| abc45 |
| abcabcabc45 |
| *** Failers |
| 42xyz |
| |
| /^(abc)?\d/ |
| abc45 |
| 42xyz |
| *** Failers |
| abcabcabc45 |
| |
| /^(abc){2,3}\d/ |
| abcabc45 |
| abcabcabc45 |
| *** Failers |
| abcabcabcabc45 |
| abc45 |
| 42xyz |
| |
| /1(abc|xyz)2(?1)3/ |
| 1abc2abc3456 |
| 1abc2xyz3456 |
| |
| /^(a*\w|ab)=(a*\w|ab)/ |
| ab=ab |
| |
| /^(a*\w|ab)=(?1)/ |
| ab=ab |
| |
| /^([^()]|\((?1)*\))*$/ |
| abc |
| a(b)c |
| a(b(c))d |
| *** Failers) |
| a(b(c)d |
| |
| /^>abc>([^()]|\((?1)*\))*<xyz<$/ |
| >abc>123<xyz< |
| >abc>1(2)3<xyz< |
| >abc>(1(2)3)<xyz< |
| |
| /^(?>a*)\d/ |
| aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa9876 |
*** Failers |
*** Failers |
Xoanon | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
| |
| /< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >/x |
| <> |
| <abcd> |
| <abc <123> hij> |
| <abc <def> hij> |
| <abc<>def> |
| <abc<> |
| *** Failers |
| <abc |
| |
| /^(?(?=abc)\w{3}:|\d\d)$/ |
| abc: |
| 12 |
| *** Failers |
| 123 |
| xyz |
| |
| /^(?(?!abc)\d\d|\w{3}:)$/ |
| abc: |
| 12 |
| *** Failers |
|