diff options
author | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2009-09-16 10:56:40 +0000 |
---|---|---|
committer | ph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15> | 2009-09-16 10:56:40 +0000 |
commit | 7692ae91e93e3734fb046e2e4edff761219a0cc1 (patch) | |
tree | 369d6b65041a01cfb4ccbbf66ba97e1142dcceca /testdata | |
parent | 449311e326f1a3f26c39e5fbc241256ee9cf50ad (diff) | |
download | pcre-7692ae91e93e3734fb046e2e4edff761219a0cc1.tar.gz |
Minor doc fix; update tests by adding comments to each file, and generally
tidying.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@450 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/testinput1 | 5 | ||||
-rw-r--r-- | testdata/testinput10 | 2 | ||||
-rw-r--r-- | testdata/testinput11 | 4 | ||||
-rw-r--r-- | testdata/testinput12 | 14 | ||||
-rw-r--r-- | testdata/testinput2 | 13 | ||||
-rw-r--r-- | testdata/testinput3 | 6 | ||||
-rw-r--r-- | testdata/testinput4 | 27 | ||||
-rw-r--r-- | testdata/testinput5 | 29 | ||||
-rw-r--r-- | testdata/testinput6 | 6 | ||||
-rw-r--r-- | testdata/testinput7 | 5 | ||||
-rw-r--r-- | testdata/testinput8 | 8 | ||||
-rw-r--r-- | testdata/testinput9 | 6 | ||||
-rw-r--r-- | testdata/testoutput1 | 5 | ||||
-rw-r--r-- | testdata/testoutput10 | 2 | ||||
-rw-r--r-- | testdata/testoutput11 | 4 | ||||
-rw-r--r-- | testdata/testoutput12 | 14 | ||||
-rw-r--r-- | testdata/testoutput2 | 13 | ||||
-rw-r--r-- | testdata/testoutput3 | 6 | ||||
-rw-r--r-- | testdata/testoutput4 | 44 | ||||
-rw-r--r-- | testdata/testoutput5 | 44 | ||||
-rw-r--r-- | testdata/testoutput6 | 6 | ||||
-rw-r--r-- | testdata/testoutput7 | 5 | ||||
-rw-r--r-- | testdata/testoutput8 | 10 | ||||
-rw-r--r-- | testdata/testoutput9 | 6 |
24 files changed, 171 insertions, 113 deletions
diff --git a/testdata/testinput1 b/testdata/testinput1 index 8b0caa4..6cacbb5 100644 --- a/testdata/testinput1 +++ b/testdata/testinput1 @@ -1,3 +1,6 @@ +/-- This set of tests is for features that are compatible with all versions of + Perl 5, in non-UTF-8 mode. --/ + /the quick brown fox/ the quick brown fox The quick brown FOX @@ -4064,4 +4067,4 @@ /^%((?(?=[a])[^%])|b)*%$/ %ab% -/ End of testinput1 / +/-- End of testinput1 --/ diff --git a/testdata/testinput10 b/testdata/testinput10 index 726a389..420c274 100644 --- a/testdata/testinput10 +++ b/testdata/testinput10 @@ -121,4 +121,4 @@ are all themselves checked in other tests. --/ /[^\xaa]/8BM -/ End of testinput10 / +/-- End of testinput10 --/ diff --git a/testdata/testinput11 b/testdata/testinput11 index 0518b68..1a08cd1 100644 --- a/testdata/testinput11 +++ b/testdata/testinput11 @@ -1,3 +1,5 @@ +/-- These tests are for the Perl 5.10 features that PCRE supports. --/ + /\H\h\V\v/ X X\x0a X\x09X\x0b @@ -250,4 +252,4 @@ ** Failers AD -/ End of testinput11 / +/-- End of testinput11 --/ diff --git a/testdata/testinput12 b/testdata/testinput12 index ae2ef10..91f31e3 100644 --- a/testdata/testinput12 +++ b/testdata/testinput12 @@ -1,3 +1,6 @@ +/-- These tests for Unicode property support test PCRE's API and show some of + the compiled code. They are not Perl-compatible. --/ + /[\p{L}]/DZ /[\p{^L}]/DZ @@ -155,9 +158,9 @@ \x{c0} \x{e0} -/The next two are special cases where the lengths of the different cases of the -same character differ. The first went wrong with heap frame storage; the 2nd -was broken in all cases./ +/-- The next two are special cases where the lengths of the different cases of +the same character differ. The first went wrong with heap frame storage; the +second was broken in all cases. --/ /^\x{023a}+?(\x{0130}+)/8i \x{023a}\x{2c65}\x{0130} @@ -185,9 +188,9 @@ was broken in all cases./ \x{c0} \x{e0} -/The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE +/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE will match it only with UCP support, because without that it has no notion -of case for anything other than the ASCII letters. / +of case for anything other than the ASCII letters. --/ /((?i)[\x{c0}])/8 \x{c0} @@ -197,3 +200,4 @@ of case for anything other than the ASCII letters. / \x{c0} \x{e0} +/-- End of testinput12 --/ diff --git a/testdata/testinput2 b/testdata/testinput2 index 1e29593..ec5d621 100644 --- a/testdata/testinput2 +++ b/testdata/testinput2 @@ -1,3 +1,14 @@ +/-- This set of tests is not Perl-compatible. It checks on special features + of PCRE's API, error diagnostics, and the compiled code of some patterns. + It also checks the non-Perl syntax the PCRE supports (Python, .NET, + Oniguruma). Finally, there are some tests where PCRE and Perl differ, + either because PCRE can't be compatible, or there is potential Perl + bug. --/ + +/-- Originally, the Perl 5.10 things were in here too, but now I have separated + many (most?) of them out into test 11. However, there may still be some + that were overlooked. --/ + /(a)b|/I /abc/I @@ -2842,4 +2853,4 @@ a random value. /Ix /^X(?7)(a)(?|(b)|(q)(r)(s))(c)(d)(Y)/ XYabcdY -/ End of testinput2 / +/-- End of testinput2 --/ diff --git a/testdata/testinput3 b/testdata/testinput3 index 1376c21..6fea2f5 100644 --- a/testdata/testinput3 +++ b/testdata/testinput3 @@ -1,3 +1,7 @@ +/-- This set of tests checks local-specific features, using the fr_FR locale. + It is not Perl-compatible. There is different version called wintestinput3 + f or use on Windows, where the locale is called "french". --/ + /^[\w]+/ *** Failers École @@ -88,4 +92,4 @@ /[[:alpha:]][[:lower:]][[:upper:]]/DZLfr_FR -/ End of testinput3 / +/-- End of testinput3 --/ diff --git a/testdata/testinput4 b/testdata/testinput4 index e5f6194..12f4c7e 100644 --- a/testdata/testinput4 +++ b/testdata/testinput4 @@ -1,7 +1,6 @@ -/-- Do not use the \x{} construct except with patterns that have the --/ -/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/ -/-- that option is set. However, the latest Perls recognize them always. --/ - +/-- This set of tests if for UTF-8 support, excluding Unicode properties. It is + compatible with all versions of Perl 5. --/ + /a.b/8 acb a\x7fb @@ -623,4 +622,22 @@ /(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8 -/ End of testinput4 / +/^[a\x{c0}]b/8 + \x{c0}b + +/^([a\x{c0}]*?)aa/8 + a\x{c0}aaaa/ + +/^([a\x{c0}]*?)aa/8 + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/^([a\x{c0}]*)aa/8 + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/^([a\x{c0}]*)a\x{c0}/8 + a\x{c0}aaaa/ + a\x{c0}a\x{c0}aaa/ + +/-- End of testinput4 --/ diff --git a/testdata/testinput5 b/testdata/testinput5 index 5d3030f..c1a21ba 100644 --- a/testdata/testinput5 +++ b/testdata/testinput5 @@ -1,3 +1,6 @@ +/-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8 + support, excluding Unicode properties. --/ + /\x{100}/8DZ /\x{1000}/8DZ @@ -53,30 +56,6 @@ /.{3,5}?/DZ8 \x{212ab}\x{212ab}\x{212ab}\x{861} -/-- These tests are here rather than in testinput4 because Perl 5.6 has some -problems with UTF-8 support, in the area of \x{..} where the value is < 255. -It grumbles about invalid UTF-8 strings. --/ - -/^[a\x{c0}]b/8 - \x{c0}b - -/^([a\x{c0}]*?)aa/8 - a\x{c0}aaaa/ - -/^([a\x{c0}]*?)aa/8 - a\x{c0}aaaa/ - a\x{c0}a\x{c0}aaa/ - -/^([a\x{c0}]*)aa/8 - a\x{c0}aaaa/ - a\x{c0}a\x{c0}aaa/ - -/^([a\x{c0}]*)a\x{c0}/8 - a\x{c0}aaaa/ - a\x{c0}a\x{c0}aaa/ - -/-- --/ - /(?<=\C)X/8 Should produce an error diagnostic @@ -741,4 +720,4 @@ can't tell the difference.) --/ the cat\P the cat\P\P -/ End of testinput5 / +/-- End of testinput5 --/ diff --git a/testdata/testinput6 b/testdata/testinput6 index f9cc5f7..f4249da 100644 --- a/testdata/testinput6 +++ b/testdata/testinput6 @@ -1,3 +1,7 @@ +/-- This set of tests is for Unicode property support. It is compatible with + Perl 5.10, but not 5.8 because it tests some extra properties that are + not in the earlier release. --/ + /^\pC\pL\pM\pN\pP\pS\pZ</8 \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}< \np\x{300}9!\$ < @@ -752,4 +756,4 @@ /[\p{Lu}\x20]+/ \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59 -/ End of testinput6 / +/-- End of testinput6 --/ diff --git a/testdata/testinput7 b/testdata/testinput7 index c32d336..7aafc95 100644 --- a/testdata/testinput7 +++ b/testdata/testinput7 @@ -1,3 +1,6 @@ +/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). + The -dfa flag must be used with pcretest when running it. --/ + /abc/ abc @@ -4486,4 +4489,4 @@ /(?=C)/g+ ABCDECBA -/ End of testinput7 / +/-- End of testinput7 --/ diff --git a/testdata/testinput8 b/testdata/testinput8 index 11884ad..e879e81 100644 --- a/testdata/testinput8 +++ b/testdata/testinput8 @@ -1,6 +1,6 @@ -/-- Do not use the \x{} construct except with patterns that have the --/ -/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/ -/-- that option is set. However, the latest Perls recognize them always. --/ +/-- This set of tests checks UTF-8 support with the DFA matching functionality + of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running + it. --/ /\x{100}ab/8 \x{100}ab @@ -667,4 +667,4 @@ /X/8f<any> A\x{1ec5}ABCXYZ -/ End of testinput 8 / +/-- End of testinput8 --/ diff --git a/testdata/testinput9 b/testdata/testinput9 index ab04455..590420c 100644 --- a/testdata/testinput9 +++ b/testdata/testinput9 @@ -1,3 +1,7 @@ +/-- This set of tests check Unicode property support with the DFA matching + functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest + when running it. --/ + /\pL\P{Nd}/8 AB *** Failers @@ -843,4 +847,4 @@ ** Failers \x{1d79}\x{a77d} -/ End / +/-- End of testinput9 --/ diff --git a/testdata/testoutput1 b/testdata/testoutput1 index 81b0cb8..a2a6dd4 100644 --- a/testdata/testoutput1 +++ b/testdata/testoutput1 @@ -1,3 +1,6 @@ +/-- This set of tests is for features that are compatible with all versions of + Perl 5, in non-UTF-8 mode. --/ + /the quick brown fox/ the quick brown fox 0: the quick brown fox @@ -6646,4 +6649,4 @@ No match 0: %ab% 1: -/ End of testinput1 / +/-- End of testinput1 --/ diff --git a/testdata/testoutput10 b/testdata/testoutput10 index 4eaaa39..a0db640 100644 --- a/testdata/testoutput10 +++ b/testdata/testoutput10 @@ -666,4 +666,4 @@ Memory allocation (code space): 40 39 End ------------------------------------------------------------------ -/ End of testinput10 / +/-- End of testinput10 --/ diff --git a/testdata/testoutput11 b/testdata/testoutput11 index b2f0d7d..f7b54ac 100644 --- a/testdata/testoutput11 +++ b/testdata/testoutput11 @@ -1,3 +1,5 @@ +/-- These tests are for the Perl 5.10 features that PCRE supports. --/ + /\H\h\V\v/ X X\x0a 0: X X\x0a @@ -518,4 +520,4 @@ No match AD No match -/ End of testinput11 / +/-- End of testinput11 --/ diff --git a/testdata/testoutput12 b/testdata/testoutput12 index 454e2e1..70ca7a3 100644 --- a/testdata/testoutput12 +++ b/testdata/testoutput12 @@ -1,3 +1,6 @@ +/-- These tests for Unicode property support test PCRE's API and show some of + the compiled code. They are not Perl-compatible. --/ + /[\p{L}]/DZ ------------------------------------------------------------------ Bra @@ -399,9 +402,9 @@ No match \x{e0} 0: \x{e0} -/The next two are special cases where the lengths of the different cases of the -same character differ. The first went wrong with heap frame storage; the 2nd -was broken in all cases./ +/-- The next two are special cases where the lengths of the different cases of +the same character differ. The first went wrong with heap frame storage; the +second was broken in all cases. --/ /^\x{023a}+?(\x{0130}+)/8i \x{023a}\x{2c65}\x{0130} @@ -447,9 +450,9 @@ was broken in all cases./ \x{e0} 0: \x{e0} -/The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE +/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE will match it only with UCP support, because without that it has no notion -of case for anything other than the ASCII letters. / +of case for anything other than the ASCII letters. --/ /((?i)[\x{c0}])/8 \x{c0} @@ -465,3 +468,4 @@ of case for anything other than the ASCII letters. / \x{e0} 0: \x{e0} +/-- End of testinput12 --/ diff --git a/testdata/testoutput2 b/testdata/testoutput2 index 393556e..67301ea 100644 --- a/testdata/testoutput2 +++ b/testdata/testoutput2 @@ -1,3 +1,14 @@ +/-- This set of tests is not Perl-compatible. It checks on special features + of PCRE's API, error diagnostics, and the compiled code of some patterns. + It also checks the non-Perl syntax the PCRE supports (Python, .NET, + Oniguruma). Finally, there are some tests where PCRE and Perl differ, + either because PCRE can't be compatible, or there is potential Perl + bug. --/ + +/-- Originally, the Perl 5.10 things were in here too, but now I have separated + many (most?) of them out into test 11. However, there may still be some + that were overlooked. --/ + /(a)b|/I Capturing subpattern count = 1 No options @@ -9834,4 +9845,4 @@ No match 6: d 7: Y -/ End of testinput2 / +/-- End of testinput2 --/ diff --git a/testdata/testoutput3 b/testdata/testoutput3 index 28b1c3a..ce18ed2 100644 --- a/testdata/testoutput3 +++ b/testdata/testoutput3 @@ -1,3 +1,7 @@ +/-- This set of tests checks local-specific features, using the fr_FR locale. + It is not Perl-compatible. There is different version called wintestinput3 + f or use on Windows, where the locale is called "french". --/ + /^[\w]+/ *** Failers No match @@ -160,4 +164,4 @@ No options No first char No need char -/ End of testinput3 / +/-- End of testinput3 --/ diff --git a/testdata/testoutput4 b/testdata/testoutput4 index e67a958..128afe4 100644 --- a/testdata/testoutput4 +++ b/testdata/testoutput4 @@ -1,9 +1,6 @@ -/-- Do not use the \x{} construct except with patterns that have the --/ -/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/ -No match -/-- that option is set. However, the latest Perls recognize them always. --/ -No match - +/-- This set of tests if for UTF-8 support, excluding Unicode properties. It is + compatible with all versions of Perl 5. --/ + /a.b/8 acb 0: acb @@ -1089,4 +1086,37 @@ No match /(?i)[\xc3\xa9\xc3\xbd]|[\xc3\xa9\xc3\xbdA]/8 -/ End of testinput4 / +/^[a\x{c0}]b/8 + \x{c0}b + 0: \x{c0}b + +/^([a\x{c0}]*?)aa/8 + a\x{c0}aaaa/ + 0: a\x{c0}aa + 1: a\x{c0} + +/^([a\x{c0}]*?)aa/8 + a\x{c0}aaaa/ + 0: a\x{c0}aa + 1: a\x{c0} + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0}aa + 1: a\x{c0}a\x{c0} + +/^([a\x{c0}]*)aa/8 + a\x{c0}aaaa/ + 0: a\x{c0}aaaa + 1: a\x{c0}aa + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0}aaa + 1: a\x{c0}a\x{c0}a + +/^([a\x{c0}]*)a\x{c0}/8 + a\x{c0}aaaa/ + 0: a\x{c0} + 1: + a\x{c0}a\x{c0}aaa/ + 0: a\x{c0}a\x{c0} + 1: a\x{c0} + +/-- End of testinput4 --/ diff --git a/testdata/testoutput5 b/testdata/testoutput5 index 71f18bf..ded5edb 100644 --- a/testdata/testoutput5 +++ b/testdata/testoutput5 @@ -1,3 +1,6 @@ +/-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8 + support, excluding Unicode properties. --/ + /\x{100}/8DZ ------------------------------------------------------------------ Bra @@ -274,45 +277,6 @@ No need char \x{212ab}\x{212ab}\x{212ab}\x{861} 0: \x{212ab}\x{212ab}\x{212ab} -/-- These tests are here rather than in testinput4 because Perl 5.6 has some -problems with UTF-8 support, in the area of \x{..} where the value is < 255. -It grumbles about invalid UTF-8 strings. --/ - -/^[a\x{c0}]b/8 - \x{c0}b - 0: \x{c0}b - -/^([a\x{c0}]*?)aa/8 - a\x{c0}aaaa/ - 0: a\x{c0}aa - 1: a\x{c0} - -/^([a\x{c0}]*?)aa/8 - a\x{c0}aaaa/ - 0: a\x{c0}aa - 1: a\x{c0} - a\x{c0}a\x{c0}aaa/ - 0: a\x{c0}a\x{c0}aa - 1: a\x{c0}a\x{c0} - -/^([a\x{c0}]*)aa/8 - a\x{c0}aaaa/ - 0: a\x{c0}aaaa - 1: a\x{c0}aa - a\x{c0}a\x{c0}aaa/ - 0: a\x{c0}a\x{c0}aaa - 1: a\x{c0}a\x{c0}a - -/^([a\x{c0}]*)a\x{c0}/8 - a\x{c0}aaaa/ - 0: a\x{c0} - 1: - a\x{c0}a\x{c0}aaa/ - 0: a\x{c0}a\x{c0} - 1: a\x{c0} - -/-- --/ - /(?<=\C)X/8 Failed: \C not allowed in lookbehind assertion at offset 6 @@ -2067,4 +2031,4 @@ Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123} the cat\P\P Partial match: the cat -/ End of testinput5 / +/-- End of testinput5 --/ diff --git a/testdata/testoutput6 b/testdata/testoutput6 index 722a73c..4245d6a 100644 --- a/testdata/testoutput6 +++ b/testdata/testoutput6 @@ -1,3 +1,7 @@ +/-- This set of tests is for Unicode property support. It is compatible with + Perl 5.10, but not 5.8 because it tests some extra properties that are + not in the earlier release. --/ + /^\pC\pL\pM\pN\pP\pS\pZ</8 \x7f\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}< 0: \x{7f}\x{c0}\x{30f}\x{660}\x{66c}\x{f01}\x{1680}< @@ -1289,4 +1293,4 @@ No match \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59 0: A P\xc2T\xc9 TODAY -/ End of testinput6 / +/-- End of testinput6 --/ diff --git a/testdata/testoutput7 b/testdata/testoutput7 index cc8b91d..b9f9bb0 100644 --- a/testdata/testoutput7 +++ b/testdata/testoutput7 @@ -1,3 +1,6 @@ +/-- This set of tests check the DFA matching functionality of pcre_dfa_exec(). + The -dfa flag must be used with pcretest when running it. --/ + /abc/ abc 0: abc @@ -7469,4 +7472,4 @@ Partial match: +ab 0: 0+ CBA -/ End of testinput7 / +/-- End of testinput7 --/ diff --git a/testdata/testoutput8 b/testdata/testoutput8 index af10c4a..d991095 100644 --- a/testdata/testoutput8 +++ b/testdata/testoutput8 @@ -1,8 +1,6 @@ -/-- Do not use the \x{} construct except with patterns that have the --/ -/-- /8 option set, because PCRE doesn't recognize them as UTF-8 unless --/ -No match -/-- that option is set. However, the latest Perls recognize them always. --/ -No match +/-- This set of tests checks UTF-8 support with the DFA matching functionality + of pcre_dfa_exec(). The -dfa flag must be used with pcretest when running + it. --/ /\x{100}ab/8 \x{100}ab @@ -1288,4 +1286,4 @@ No match A\x{1ec5}ABCXYZ 0: X -/ End of testinput 8 / +/-- End of testinput8 --/ diff --git a/testdata/testoutput9 b/testdata/testoutput9 index 04e3873..851e3f0 100644 --- a/testdata/testoutput9 +++ b/testdata/testoutput9 @@ -1,3 +1,7 @@ +/-- This set of tests check Unicode property support with the DFA matching + functionality of pcre_dfa_exec(). The -dfa flag must be used with pcretest + when running it. --/ + /\pL\P{Nd}/8 AB 0: AB @@ -1670,4 +1674,4 @@ No match \x{1d79}\x{a77d} No match -/ End / +/-- End of testinput9 --/ |