]> granicus.if.org Git - php/commitdiff
Update bundled PCRE to 8.12
authorScott MacVicar <scottmac@php.net>
Fri, 13 May 2011 07:00:45 +0000 (07:00 +0000)
committerScott MacVicar <scottmac@php.net>
Fri, 13 May 2011 07:00:45 +0000 (07:00 +0000)
23 files changed:
NEWS
ext/pcre/pcrelib/ChangeLog
ext/pcre/pcrelib/NEWS
ext/pcre/pcrelib/config.h
ext/pcre/pcrelib/doc/pcre.txt
ext/pcre/pcrelib/pcre.h
ext/pcre/pcrelib/pcre_internal.h
ext/pcre/pcrelib/testdata/grepoutput
ext/pcre/pcrelib/testdata/testinput1
ext/pcre/pcrelib/testdata/testinput10
ext/pcre/pcrelib/testdata/testinput2
ext/pcre/pcrelib/testdata/testinput4
ext/pcre/pcrelib/testdata/testinput6
ext/pcre/pcrelib/testdata/testinput7
ext/pcre/pcrelib/testdata/testinput8
ext/pcre/pcrelib/testdata/testoutput1
ext/pcre/pcrelib/testdata/testoutput10
ext/pcre/pcrelib/testdata/testoutput2
ext/pcre/pcrelib/testdata/testoutput4
ext/pcre/pcrelib/testdata/testoutput6
ext/pcre/pcrelib/testdata/testoutput7
ext/pcre/pcrelib/testdata/testoutput8
ext/pcre/upgrade-pcre.php

diff --git a/NEWS b/NEWS
index a06244ed09afe2ebe79e1355c9a8019d24206940..b78ee657ea43eea2393031b48a5b209e030d2e8c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,7 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2011, PHP 5.3.7
 - Upgraded bundled SQLite to version 3.7.6.2. (Scott)
+- Upgraded bundled PCRE to version 8.12. (Scott)
 
 - Zend Engine:
   . Fixed bug #54585 (track_errors causes segfault). (Dmitry)
index 32cd0029b832d9944f11b1dfd0ed34d1db9f21ad..8a301403603af41a19bb52b4c8f3d8d442717085 100644 (file)
@@ -1,6 +1,40 @@
 ChangeLog for PCRE
 ------------------
 
+Version 8.12 15-Jan-2011
+------------------------
+
+1.  Fixed some typos in the markup of the man pages, and wrote a script that
+    checks for such things as part of the documentation building process.
+
+2.  On a big-endian 64-bit system, pcregrep did not correctly process the
+    --match-limit and --recursion-limit options (added for 8.11). In
+    particular, this made one of the standard tests fail. (The integer value
+    went into the wrong half of a long int.)
+
+3.  If the --colour option was given to pcregrep with -v (invert match), it
+    did strange things, either producing crazy output, or crashing. It should,
+    of course, ignore a request for colour when reporting lines that do not
+    match.
+
+4.  Another pcregrep bug caused similar problems if --colour was specified with
+    -M (multiline) and the pattern match finished with a line ending.
+
+5.  In pcregrep, when a pattern that ended with a literal newline sequence was
+    matched in multiline mode, the following line was shown as part of the
+    match. This seems wrong, so I have changed it.
+
+6.  Another pcregrep bug in multiline mode, when --colour was specified, caused
+    the check for further matches in the same line (so they could be coloured)
+    to overrun the end of the current line. If another match was found, it was
+    incorrectly shown (and then shown again when found in the next line).
+
+7.  If pcregrep was compiled under Windows, there was a reference to the
+    function pcregrep_exit() before it was defined. I am assuming this was
+    the cause of the "error C2371: 'pcregrep_exit' : redefinition;" that was
+    reported by a user. I've moved the definition above the reference.
+
+
 Version 8.11 10-Dec-2010
 ------------------------
 
index fdc4ba1e67073f4e911ecd4dd23545393393eea7..5f2b29bd22cdbc4db810e3f4b9f37335495359f4 100644 (file)
@@ -1,6 +1,13 @@
 News about PCRE releases
 ------------------------
 
+Release 8.12 15-Jan-2011
+------------------------
+
+This release fixes some bugs in pcregrep, one of which caused the tests to fail
+on 64-bit big-endian systems. There are no changes to the code of the library.
+
+
 Release 8.11 10-Dec-2010
 ------------------------
 
index b7e02b326f506703b79240f30deb9ec96752aaf5..46e0625fa01f208f7813d976b16ffcc1ffcfbafb 100644 (file)
@@ -282,7 +282,7 @@ them both to 0; an emulation function will be used. */
 #define PACKAGE_NAME "PCRE"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PCRE 8.11"
+#define PACKAGE_STRING "PCRE 8.12"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "pcre"
@@ -291,7 +291,7 @@ them both to 0; an emulation function will be used. */
 #define PACKAGE_URL ""
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "8.11"
+#define PACKAGE_VERSION "8.12"
 
 
 /* If you are compiling for a system other than a Unix-like system or
@@ -347,7 +347,7 @@ them both to 0; an emulation function will be used. */
 
 /* Version number of package */
 #ifndef VERSION
-#define VERSION "8.11"
+#define VERSION "8.12"
 #endif
 
 /* Define to empty if `const' does not conform to ANSI C. */
index 5d769dfb0cab32b3e47a0316658bf39961a66afa..ac4254ec99d6ba2ec17fdacce56a623574e6e350 100644 (file)
@@ -6512,6 +6512,7 @@ SAVING AND RE-USING PRECOMPILED PCRE PATTERNS
 
 
 SAVING A COMPILED PATTERN
+
        The value returned by pcre_compile() points to a single block of memory
        that  holds  the compiled pattern and associated data. You can find the
        length of this block in bytes by calling pcre_fullinfo() with an  argu-
index ec454ee60dd39bf28f8b3e4c962678f045bad80b..21c46737243e8b645e4c5413a57123f94ef506cc 100644 (file)
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
 /* The current PCRE version information. */
 
 #define PCRE_MAJOR          8
-#define PCRE_MINOR          11
+#define PCRE_MINOR          12
 #define PCRE_PRERELEASE     
-#define PCRE_DATE           2010-12-10
+#define PCRE_DATE           2011-01-15
 
 /* When an application links to a PCRE DLL in Windows, the symbols that are
 imported have to be identified as such. When building PCRE, the appropriate
index 6ec0b7a5412fa0d380036fa21953b2102c3bd43e..5f736d13acd09073312476d0acbb4d71b4866abd 100644 (file)
@@ -192,9 +192,7 @@ stdint.h is available, include it; it may define INT64_MAX. Systems that do not
 have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set
 by "configure". */
 
-#ifdef PHP_WIN32
-#include "win32/php_stdint.h"
-#elif HAVE_STDINT_H
+#if HAVE_STDINT_H
 #include <stdint.h>
 #elif HAVE_INTTYPES_H
 #include <inttypes.h>
index da7a370270aba921c63cc3eceda19917504b7dc8..a0392509c0a1ef91be8a5de832e3856dd545683b 100644 (file)
@@ -2,15 +2,19 @@
 PATTERN at the start of a line.
 In the middle of a line, PATTERN appears.
 Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 2 ------------------------------
 PATTERN at the start of a line.
+RC=0
 ---------------------------- Test 3 ------------------------------
 7:PATTERN at the start of a line.
 8:In the middle of a line, PATTERN appears.
 10:This pattern is in lower case.
 608:Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 4 ------------------------------
 4
+RC=0
 ---------------------------- Test 5 ------------------------------
 ./testdata/grepinput:7:PATTERN at the start of a line.
 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -19,6 +23,7 @@ PATTERN at the start of a line.
 ./testdata/grepinputx:3:Here is the pattern again.
 ./testdata/grepinputx:5:Pattern
 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 6 ------------------------------
 7:PATTERN at the start of a line.
 8:In the middle of a line, PATTERN appears.
@@ -27,11 +32,14 @@ PATTERN at the start of a line.
 3:Here is the pattern again.
 5:Pattern
 42:This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 7 ------------------------------
 ./testdata/grepinput
 ./testdata/grepinputx
+RC=0
 ---------------------------- Test 8 ------------------------------
 ./testdata/grepinput
+RC=0
 ---------------------------- Test 9 ------------------------------
 RC=0
 ---------------------------- Test 10 -----------------------------
@@ -78,33 +86,43 @@ RC=1
 40:twenty
 41:
 43:This is the last line of this file.
+RC=0
 ---------------------------- Test 12 -----------------------------
 Pattern
+RC=0
 ---------------------------- Test 13 -----------------------------
 Here is the pattern again.
 That time it was on a line by itself.
 This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 14 -----------------------------
 ./testdata/grepinputx:To pat or not to pat, that is the question.
+RC=0
 ---------------------------- Test 15 -----------------------------
 pcregrep: Error in command-line regex at offset 4: nothing to repeat
+RC=2
 ---------------------------- Test 16 -----------------------------
 pcregrep: Failed to open ./testdata/nonexistfile: No such file or directory
+RC=2
 ---------------------------- Test 17 -----------------------------
 features should be added at the end, because some of the tests involve the
 output of line numbers, and we don't want these to change.
+RC=0
 ---------------------------- Test 18 -----------------------------
 4:features should be added at the end, because some of the tests involve the
 output of line numbers, and we don't want these to change.
 583:brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 -------------------------------------------------------------------------------
+RC=0
 ---------------------------- Test 19 -----------------------------
 Pattern
+RC=0
 ---------------------------- Test 20 -----------------------------
 10:complete pair
 of lines
 16:complete pair
 of lines
+RC=0
 ---------------------------- Test 21 -----------------------------
 24:four
 25-five
@@ -115,6 +133,7 @@ of lines
 35-fifteen
 36-sixteen
 37-seventeen
+RC=0
 ---------------------------- Test 22 -----------------------------
 21-one
 22-two
@@ -125,6 +144,7 @@ of lines
 32-twelve
 33-thirteen
 34:fourteen
+RC=0
 ---------------------------- Test 23 -----------------------------
 one
 two
@@ -141,6 +161,7 @@ fourteen
 fifteen
 sixteen
 seventeen
+RC=0
 ---------------------------- Test 24 -----------------------------
 four
 five
@@ -162,6 +183,7 @@ twenty
 
 This line contains pattern not on a line by itself.
 This is the last line of this file.
+RC=0
 ---------------------------- Test 25 -----------------------------
 15-
 16-complete pair
@@ -183,6 +205,7 @@ This is the last line of this file.
 32-twelve
 33-thirteen
 34:fourteen
+RC=0
 ---------------------------- Test 26 -----------------------------
 
 complete pair
@@ -213,6 +236,7 @@ twenty
 
 This line contains pattern not on a line by itself.
 This is the last line of this file.
+RC=0
 ---------------------------- Test 27 -----------------------------
 four
 five
@@ -234,6 +258,7 @@ twenty
 
 This line contains pattern not on a line by itself.
 This is the last line of this file.
+RC=0
 ---------------------------- Test 28 -----------------------------
 14-of lines all by themselves.
 15-
@@ -256,6 +281,7 @@ This is the last line of this file.
 32-twelve
 33-thirteen
 34:fourteen
+RC=0
 ---------------------------- Test 29 -----------------------------
 of lines all by themselves.
 
@@ -287,6 +313,7 @@ twenty
 
 This line contains pattern not on a line by itself.
 This is the last line of this file.
+RC=0
 ---------------------------- Test 30 -----------------------------
 ./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
 ./testdata/grepinput-5-output of line numbers, and we don't want these to change.
@@ -311,6 +338,7 @@ This is the last line of this file.
 ./testdata/grepinputx-40-twenty
 ./testdata/grepinputx-41-
 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 31 -----------------------------
 ./testdata/grepinput:7:PATTERN at the start of a line.
 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -332,8 +360,10 @@ This is the last line of this file.
 --
 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
 ./testdata/grepinputx-43-This is the last line of this file.
+RC=0
 ---------------------------- Test 32 -----------------------------
 ./testdata/grepinputx
+RC=0
 ---------------------------- Test 33 -----------------------------
 pcregrep: Failed to open ./testdata/grepnonexist: No such file or directory
 RC=2
@@ -343,6 +373,7 @@ RC=2
 ./testdata/grepinputx
 RC=0
 ---------------------------- Test 36 -----------------------------
+./testdata/grepinput3
 ./testdata/grepinput8
 ./testdata/grepinputx
 RC=0
@@ -351,99 +382,214 @@ aaaaa0
 aaaaa2
 RC=0
 ======== STDERR ========
-pcregrep: pcre_exec() error -8 while matching this text:
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-pcregrep: error -8 means that a resource limit was exceeded
-pcregrep: check your regex for nested unlimited loops
-pcregrep: pcre_exec() error -8 while matching this text:
+
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
 ---------------------------- Test 38 ------------------------------
 This line contains a binary zero here >\0< for testing.
+RC=0
 ---------------------------- Test 39 ------------------------------
 This is a line before the binary zero.
 This line contains a binary zero here >\0< for testing.
+RC=0
 ---------------------------- Test 40 ------------------------------
 This line contains a binary zero here >\0< for testing.
 This is a line after the binary zero.
+RC=0
 ---------------------------- Test 41 ------------------------------
 before the binary zero
 after the binary zero
----------------------------- Test 41 ------------------------------
+RC=0
+---------------------------- Test 42 ------------------------------
 ./testdata/grepinput:595:before the binary zero
 ./testdata/grepinput:597:after the binary zero
----------------------------- Test 42 ------------------------------
+RC=0
+---------------------------- Test 43 ------------------------------
 595:before
 595:zero
 596:zero
 597:after
 597:zero
----------------------------- Test 43 ------------------------------
+RC=0
+---------------------------- Test 44 ------------------------------
 595:before
 595:zero
 596:zero
 597:zero
----------------------------- Test 44 ------------------------------
+RC=0
+---------------------------- Test 45 ------------------------------
 10:pattern
 595:binary
 596:binary
 597:binary
----------------------------- Test 45 ------------------------------
-pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=0
 ---------------------------- Test 46 ------------------------------
-AB.VE
+pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=2
 ---------------------------- Test 47 ------------------------------
+AB.VE
+RC=0
+---------------------------- Test 48 ------------------------------
 ABOVE the elephant 
 AB.VE
 AB.VE the turtle
----------------------------- Test 48 ------------------------------
+RC=0
+---------------------------- Test 49 ------------------------------
 ABOVE the elephant 
 AB.VE
 AB.VE the turtle
 PUT NEW DATA ABOVE THIS LINE.
----------------------------- Test 49 ------------------------------
+RC=0
 ---------------------------- Test 50 ------------------------------
+RC=1
+---------------------------- Test 51 ------------------------------
 over the lazy dog.
 This time it jumps and jumps and jumps.
----------------------------- Test 51 ------------------------------
+RC=0
+---------------------------- Test 52 ------------------------------
 fox \e[1;31mjumps\e[00m
 This time it \e[1;31mjumps\e[00m and \e[1;31mjumps\e[00m and \e[1;31mjumps\e[00m.
----------------------------- Test 52 ------------------------------
+RC=0
+---------------------------- Test 53 ------------------------------
 36972,6
 36990,4
 37024,4
 37066,5
 37083,4
----------------------------- Test 53 ------------------------------
+RC=0
+---------------------------- Test 54 ------------------------------
 595:15,6
 595:33,4
 596:28,4
 597:15,5
 597:32,4
----------------------------- Test 54 -----------------------------
+RC=0
+---------------------------- Test 55 -----------------------------
 Here is the \e[1;31mpattern\e[00m again.
 That time it was on a \e[1;31mline by itself\e[00m.
 This line contains \e[1;31mpattern\e[00m not on a \e[1;31mline by itself\e[00m.
----------------------------- Test 55 -----------------------------
+RC=0
+---------------------------- Test 56 -----------------------------
 ./testdata/grepinput:456
+./testdata/grepinput3:0
 ./testdata/grepinput8:0
 ./testdata/grepinputv:1
 ./testdata/grepinputx:0
----------------------------- Test 56 -----------------------------
+RC=0
+---------------------------- Test 57 -----------------------------
 ./testdata/grepinput:456
 ./testdata/grepinputv:1
----------------------------- Test 57 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 58 -----------------------------
 PATTERN at the start of a line.
 In the middle of a line, PATTERN appears.
 Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 59 -----------------------------
 PATTERN at the start of a line.
 In the middle of a line, PATTERN appears.
 Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 60 -----------------------------
 PATTERN at the start of a line.
 In the middle of a line, PATTERN appears.
 Check up on PATTERN near the end.
+RC=0
+---------------------------- Test 61 -----------------------------
+PATTERN at the start of a line.
+In the middle of a line, PATTERN appears.
+Check up on PATTERN near the end.
+RC=0
+---------------------------- Test 62 -----------------------------
+pcregrep: pcre_exec() gave error -8 while matching text that starts:
+
+This is a file of miscellaneous text that is used as test data for checking
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+RC=1
+---------------------------- Test 63 -----------------------------
+pcregrep: pcre_exec() gave error -21 while matching text that starts:
+
+This is a file of miscellaneous text that is used as test data for checking
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+RC=1
+---------------------------- Test 64 ------------------------------
+appears
+RC=0
+---------------------------- Test 65 ------------------------------
+pear
+RC=0
+---------------------------- Test 66 ------------------------------
+RC=0
+---------------------------- Test 67 ------------------------------
+RC=0
+---------------------------- Test 68 ------------------------------
+pear
+RC=0
+---------------------------- Test 69 -----------------------------
+1:This is a second file of input for the pcregrep tests.
+2:
+4:
+5:Pattern
+6:That time it was on a line by itself.
+7:
+8:To pat or not to pat, that is the question.
+9:
+10:complete pair
+11:of lines
+12:
+13:That was a complete pair
+14:of lines all by themselves.
+15:
+16:complete pair
+17:of lines
+18:
+19:And there they were again, to check line numbers.
+20:
+21:one
+22:two
+23:three
+24:four
+25:five
+26:six
+27:seven
+28:eight
+29:nine
+30:ten
+31:eleven
+32:twelve
+33:thirteen
+34:fourteen
+35:fifteen
+36:sixteen
+37:seventeen
+38:eighteen
+39:nineteen
+40:twenty
+41:
+43:This is the last line of this file.
+RC=0
+---------------------------- Test 70 -----------------------------
+\e[1;31mtriple: t1_txt  s1_tag  s_txt   p_tag   p_txt   o_tag   o_txt
+
+\e[00m\e[1;31mtriple:    t3_txt  s2_tag  s_txt   p_tag   p_txt   o_tag   o_txt
+
+\e[00m\e[1;31mtriple:    t4_txt  s1_tag  s_txt   p_tag   p_txt   o_tag   o_txt
+
+\e[00m\e[1;31mtriple:    t6_txt  s2_tag  s_txt   p_tag   p_txt   o_tag   o_txt
+
+\e[00mRC=0
index d999d2948a0a31bbca28a13e28fc01f0be528c50..97e5c366ef9845ee04c3e186829833719cf96b2e 100644 (file)
     ** Failers
     XABX   
 
+/[\x00-\xff\s]+/
+    \x0a\x0b\x0c\x0d
+
+/^\c\7f/
+    ?
+
 /-- End of testinput1 --/
index 99afab88bd3253a9dd29cad73b66efc8a853f9ee..7210cc5f8efed07a9f7394aa047d5e33cdc9a082 100644 (file)
@@ -132,4 +132,6 @@ is required for these tests. --/
 
 /[[:^alpha:]\S]+/8WB
 
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+
 /-- End of testinput10 --/
index cc94bed4e8b1525a9835820f9b5203e8d5d71ae0..7cc87616500190fdbdc51dfd877d884a2e54d3ec 100644 (file)
@@ -5,7 +5,7 @@
     either because PCRE can't be compatible, or there is a possible Perl 
     bug. --/  
   
-/-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have 
+/-- 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. --/   
 
@@ -2346,6 +2346,15 @@ a random value. /Ix
     a\nb  
     a\r\nb  
     a\x85b 
+    
+/(*ANY).*/g
+    abc\r\ndef
+
+/(*ANYCRLF).*/g
+    abc\r\ndef
+
+/(*CRLF).*/g
+    abc\r\ndef
 
 /a\Rb/I<bsr_anycrlf>
     a\rb
@@ -2575,6 +2584,12 @@ a random value. /Ix
   abc\Y
   abcxypqr  
   abcxypqr\Y  
+  
+/(*NO_START_OPT)xyz/C
+  abcxyz 
+
+/xyz/CY
+  abcxyz 
 
 /^"((?(?=[a])[^"])|b)*"$/C
     "ab"
@@ -3170,9 +3185,9 @@ a random value. /Ix
     xxxxabcde\P
     xxxxabcde\P\P
 
-/-- This is not in the Perl 5.10 test because Perl seems currently to be broken
-    and not behaving as specified in that it *does* bumpalong after hitting
-    (*COMMIT). --/ 
+/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+    broken and not behaving as specified in that it *does* bumpalong after
+    hitting (*COMMIT). --/
 
 /(?1)(A(*COMMIT)|B)D/
     ABD
@@ -3216,7 +3231,7 @@ a random value. /Ix
 
 /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
 
-/ -- The first four of these are not in the Perl 5.10 test because Perl 
+/ -- The first four of these are not in the Perl >= 5.10 test because Perl 
      documents that the use of \K in assertions is "not well defined". The
      last is here because Perl gives the match as "b" rather than "ab". I
      believe this to be a Perl bug. --/  
@@ -3464,22 +3479,22 @@ with \Y. ---/
     abcde
 
 /A\NB./BZ
-  ACBD
-  ** Failers
-  A\nB
-  ACB\n   
+    ACBD
+    *** Failers
+    A\nB
+    ACB\n   
 
 /A\NB./sBZ
-  ACBD
-  ACB\n 
-  ** Failers
-  A\nB  
+    ACBD
+    ACB\n 
+    *** Failers
+    A\nB  
   
 /A\NB/<crlf>
-  A\nB
-  A\rB
-  ** Failers
-  A\r\nB    
+    A\nB
+    A\rB
+    ** Failers
+    A\r\nB    
 
 /\R+b/BZ
 
@@ -3491,4 +3506,68 @@ with \Y. ---/
 
 /\s*\R/BZ
 
+/-- Perl treats this one differently, not failing the second string. I believe
+    that is a bug in Perl. --/
+
+/^((abc|abcx)(*THEN)y|abcd)/
+    abcd
+    *** Failers 
+    abcxy 
+
+/(?<=abc)def/
+    abc\P\P
+
+/abc$/
+    abc
+    abc\P
+    abc\P\P
+
+/abc$/m
+    abc
+    abc\n
+    abc\P\P
+    abc\n\P\P 
+    abc\P
+    abc\n\P
+
+/abc\z/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\Z/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\b/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\B/
+    abc
+    abc\P
+    abc\P\P
+
+/.+/
+    abc\>0
+    abc\>1
+    abc\>2
+    abc\>3
+    abc\>4
+    abc\>-4 
+
+/^\cģ/
+
+/(?P<abn>(?P=abn)xxx)/BZ
+
+/(a\1z)/BZ
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+
+/(?P<abn>(?P=axn)xxx)/BZ
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+
 /-- End of testinput2 --/
index 12f4c7e3b67d84ea49352bf16b5bd4c3dced9475..e2bae423b88207842fb2a8ac936eb137566a53d0 100644 (file)
 /a\Cb/8
     aXb
     a\nb
-    *** Failers 
+    
+/a\C\Cb/8 
     a\x{100}b 
 
 /[z-\x{100}]/8i
     a\x{c0}aaaa/ 
     a\x{c0}a\x{c0}aaa/ 
 
+/A*/g8
+    AAB\x{123}BAA
+
 /-- End of testinput4 --/
index e923e009961ed1706938013fa8aa4f592f559288..503a5bc764c7a658bd190a232702c69d26159ea7 100644 (file)
@@ -1,5 +1,5 @@
 /-- 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
+    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
index 5d2731192797148bc4e0e6f1e54e5f1807e45cd8..66748873c5a6c8111b97e5f0380f68597bf925f4 100644 (file)
   abc\Y
   abcxypqr  
   abcxypqr\Y  
+
+/(*NO_START_OPT)xyz/C
+  abcxyz 
   
 /(?C)ab/
   ab
 /^(?(?!a(*SKIP)b))/
     ac
 
+/(?<=abc)def/
+    abc\P\P
+
+/abc$/
+    abc
+    abc\P
+    abc\P\P
+
+/abc$/m
+    abc
+    abc\n
+    abc\P\P
+    abc\n\P\P 
+    abc\P
+    abc\n\P
+
+/abc\z/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\Z/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\b/
+    abc
+    abc\P
+    abc\P\P
+
+/abc\B/
+    abc
+    abc\P
+    abc\P\P
+
+/.+/
+    abc\>0
+    abc\>1
+    abc\>2
+    abc\>3
+    abc\>4
+    abc\>-4 
+
 /-- End of testinput7 --/
index 1c6f684b4322893e13c0699a05162579f2034708..55d2fd3c06809cadf4bec6f3f92115bd77e52b70 100644 (file)
@@ -63,6 +63,9 @@
     Ã
     ÃÃÃ
     ÃÃÃ\?
+    \xe1\x88 
+    \P\xe1\x88 
+    \P\P\xe1\x88 
 
 /a.b/8
     acb
     xxxxabcde\P
     xxxxabcde\P\P
 
+/\bthe cat\b/8
+    the cat\P
+    the cat\P\P
+
+/a+/8
+    a\x{123}aa\>1
+    a\x{123}aa\>2
+    a\x{123}aa\>3
+    a\x{123}aa\>4
+    a\x{123}aa\>5
+    a\x{123}aa\>6
+
 /-- End of testinput8 --/ 
index 2fd033cc3f39ce681215910b141f24cae07681c2..6ab67a7254edcc077101020dd3b254158fcc6c4b 100644 (file)
@@ -6658,4 +6658,12 @@ No match
     XABX   
 No match
 
+/[\x00-\xff\s]+/
+    \x0a\x0b\x0c\x0d
+ 0: \x0a\x0b\x0c\x0d
+
+/^\c\7f/
+    ?
+ 0: ?
+
 /-- End of testinput1 --/
index 4994584ddf519a40aee7e70e32939f6d212f4ab9..b88474c7ba00c23c3430d053c3fc4ffc6db08c59 100644 (file)
@@ -707,4 +707,33 @@ Memory allocation (code space): 40
  18     End
 ------------------------------------------------------------------
 
+/abc(d|e)(*THEN)x(123(*THEN)4|567(b|q)(*THEN)xx)/B
+------------------------------------------------------------------
+  0  79 Bra
+  3     abc
+  9   7 CBra 1
+ 14     d
+ 16   5 Alt
+ 19     e
+ 21  12 Ket
+ 24     *THEN 24
+ 27     x
+ 29  16 CBra 2
+ 34     123
+ 40     *THEN 11
+ 43     4
+ 45  31 Alt
+ 48     567
+ 54   7 CBra 3
+ 59     b
+ 61   5 Alt
+ 64     q
+ 66  12 Ket
+ 69     *THEN 24
+ 72     xx
+ 76  47 Ket
+ 79  79 Ket
+ 82     End
+------------------------------------------------------------------
+
 /-- End of testinput10 --/
index 2baa6e923eeec63b683dd16749f2adba85332fec..531d617f0077ec905cb8bc23bafc4078bab3fe0d 100644 (file)
@@ -5,7 +5,7 @@
     either because PCRE can't be compatible, or there is a possible Perl 
     bug. --/  
   
-/-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have 
+/-- 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. --/   
 
@@ -8787,6 +8787,27 @@ No match
 No match
     a\x85b 
 No match
+    
+/(*ANY).*/g
+    abc\r\ndef
+ 0: abc
+ 0: 
+ 0: def
+ 0: 
+
+/(*ANYCRLF).*/g
+    abc\r\ndef
+ 0: abc
+ 0: 
+ 0: def
+ 0: 
+
+/(*CRLF).*/g
+    abc\r\ndef
+ 0: abc
+ 0: 
+ 0: def
+ 0: 
 
 /a\Rb/I<bsr_anycrlf>
 Capturing subpattern count = 0
@@ -9273,6 +9294,30 @@ No match
  +0        ^     x
  +0         ^    x
 No match
+  
+/(*NO_START_OPT)xyz/C
+  abcxyz 
+--->abcxyz
++15 ^          x
++15  ^         x
++15   ^        x
++15    ^       x
++16    ^^      y
++17    ^ ^     z
++18    ^  ^    
+ 0: xyz
+
+/xyz/CY
+  abcxyz 
+--->abcxyz
+ +0 ^          x
+ +0  ^         x
+ +0   ^        x
+ +0    ^       x
+ +1    ^^      y
+ +2    ^ ^     z
+ +3    ^  ^    
+ 0: xyz
 
 /^"((?(?=[a])[^"])|b)*"$/C
     "ab"
@@ -10459,9 +10504,9 @@ Partial match: abca
     xxxxabcde\P\P
 Partial match: abcde
 
-/-- This is not in the Perl 5.10 test because Perl seems currently to be broken
-    and not behaving as specified in that it *does* bumpalong after hitting
-    (*COMMIT). --/ 
+/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+    broken and not behaving as specified in that it *does* bumpalong after
+    hitting (*COMMIT). --/
 
 /(?1)(A(*COMMIT)|B)D/
     ABD
@@ -10664,7 +10709,7 @@ No match
         End
 ------------------------------------------------------------------
 
-/ -- The first four of these are not in the Perl 5.10 test because Perl 
+/ -- The first four of these are not in the Perl >= 5.10 test because Perl 
      documents that the use of \K in assertions is "not well defined". The
      last is here because Perl gives the match as "b" rather than "ab". I
      believe this to be a Perl bug. --/  
@@ -11043,13 +11088,13 @@ No match
         Ket
         End
 ------------------------------------------------------------------
-  ACBD
+    ACBD
  0: ACBD
-  ** Failers
+    *** Failers
 No match
-  A\nB
+    A\nB
 No match
-  ACB\n   
+    ACB\n   
 No match
 
 /A\NB./sBZ
@@ -11062,23 +11107,23 @@ No match
         Ket
         End
 ------------------------------------------------------------------
-  ACBD
+    ACBD
  0: ACBD
-  ACB\n 
+    ACB\n 
  0: ACB\x0a
-  ** Failers
+    *** Failers
 No match
-  A\nB  
+    A\nB  
 No match
   
 /A\NB/<crlf>
-  A\nB
+    A\nB
  0: A\x0aB
-  A\rB
+    A\rB
  0: A\x0dB
-  ** Failers
+    ** Failers
 No match
-  A\r\nB    
+    A\r\nB    
 No match
 
 /\R+b/BZ
@@ -11126,4 +11171,138 @@ No match
         End
 ------------------------------------------------------------------
 
+/-- Perl treats this one differently, not failing the second string. I believe
+    that is a bug in Perl. --/
+
+/^((abc|abcx)(*THEN)y|abcd)/
+    abcd
+ 0: abcd
+ 1: abcd
+    *** Failers 
+No match
+    abcxy 
+No match
+
+/(?<=abc)def/
+    abc\P\P
+Partial match: abc
+
+/abc$/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc$/m
+    abc
+ 0: abc
+    abc\n
+ 0: abc
+    abc\P\P
+Partial match: abc
+    abc\n\P\P 
+ 0: abc
+    abc\P
+ 0: abc
+    abc\n\P
+ 0: abc
+
+/abc\z/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\Z/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\b/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\B/
+    abc
+No match
+    abc\P
+Partial match: abc
+    abc\P\P
+Partial match: abc
+
+/.+/
+    abc\>0
+ 0: abc
+    abc\>1
+ 0: bc
+    abc\>2
+ 0: c
+    abc\>3
+No match
+    abc\>4
+Error -24
+    abc\>-4 
+Error -24
+
+/^\cģ/
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+        Bra
+        Once
+        CBra 1
+        \1
+        xxx
+        Ket
+        Ket
+        Ket
+        End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+        Bra
+        Once
+        CBra 1
+        a
+        \1
+        z
+        Ket
+        Ket
+        Ket
+        End
+------------------------------------------------------------------
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+Failed: syntax error in subpattern name (missing terminator) at offset 29
+
+/(?P<abn>(?P=axn)xxx)/BZ
+Failed: reference to non-existent subpattern at offset 15
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+------------------------------------------------------------------
+        Bra
+        CBra 1
+        \2
+        xxx
+        Ket
+        CBra 2
+        yy
+        Ket
+        Ket
+        End
+------------------------------------------------------------------
+
 /-- End of testinput2 --/
index 128afe4386600c30be8556e6240ee17a850d83ed..4591026d404e7a2868143e3bbc66178c9245331d 100644 (file)
@@ -802,10 +802,10 @@ No match
  0: aXb
     a\nb
  0: a\x{0a}b
-    *** Failers 
-No match
+    
+/a\C\Cb/8 
     a\x{100}b 
-No match
+ 0: a\x{100}b
 
 /[z-\x{100}]/8i
     z
@@ -1119,4 +1119,13 @@ No match
  0: a\x{c0}a\x{c0}
  1: a\x{c0}
 
+/A*/g8
+    AAB\x{123}BAA
+ 0: AA
+ 0: 
+ 0: 
+ 0: 
+ 0: AA
+ 0: 
+
 /-- End of testinput4 --/
index e000083b06a791a7722609c782c750a204c3ab00..6a9ec839d947d422b564b4636cdfbe1a01b862d7 100644 (file)
@@ -1,5 +1,5 @@
 /-- 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
+    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
index 2aab80d74b3b761b835af3362fa9a55e6e591086..123ba82c4b0b0856e258ee128096f4060838f33e 100644 (file)
@@ -7319,6 +7319,18 @@ No match
  +0        ^     x
  +0         ^    x
 No match
+
+/(*NO_START_OPT)xyz/C
+  abcxyz 
+--->abcxyz
++15 ^          x
++15  ^         x
++15   ^        x
++15    ^       x
++16    ^^      y
++17    ^ ^     z
++18    ^  ^    
+ 0: xyz
   
 /(?C)ab/
   ab
@@ -7610,4 +7622,79 @@ Error -16
     ac
 Error -16
 
+/(?<=abc)def/
+    abc\P\P
+Partial match: abc
+
+/abc$/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc$/m
+    abc
+ 0: abc
+    abc\n
+ 0: abc
+    abc\P\P
+Partial match: abc
+    abc\n\P\P 
+ 0: abc
+    abc\P
+ 0: abc
+    abc\n\P
+ 0: abc
+
+/abc\z/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\Z/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\b/
+    abc
+ 0: abc
+    abc\P
+ 0: abc
+    abc\P\P
+Partial match: abc
+
+/abc\B/
+    abc
+No match
+    abc\P
+Partial match: abc
+    abc\P\P
+Partial match: abc
+
+/.+/
+    abc\>0
+ 0: abc
+ 1: ab
+ 2: a
+    abc\>1
+ 0: bc
+ 1: b
+    abc\>2
+ 0: c
+    abc\>3
+No match
+    abc\>4
+Error -24
+    abc\>-4 
+Error -24
+
 /-- End of testinput7 --/
index 0cc87d79d02aee300c73ebe82846834484639823..f4f5343ef21b1d71c3c1c9afaf5a957eb40a56e0 100644 (file)
@@ -105,6 +105,12 @@ Error -10
 Error -10
     ÃÃÃ\?
 No match
+    \xe1\x88 
+Error -10
+    \P\xe1\x88 
+Error -10
+    \P\P\xe1\x88 
+Error -25
 
 /a.b/8
     acb
@@ -1320,4 +1326,26 @@ Partial match: abc1
     xxxxabcde\P\P
 Partial match: abcde
 
+/\bthe cat\b/8
+    the cat\P
+ 0: the cat
+    the cat\P\P
+Partial match: the cat
+
+/a+/8
+    a\x{123}aa\>1
+ 0: aa
+ 1: a
+    a\x{123}aa\>2
+Error -11
+    a\x{123}aa\>3
+ 0: aa
+ 1: a
+    a\x{123}aa\>4
+ 0: a
+    a\x{123}aa\>5
+No match
+    a\x{123}aa\>6
+Error -24
+
 /-- End of testinput8 --/ 
index 338b2079f7c791771968e2e9f38fbadf6301764d..a48f8d76043e3ef226fd6dba3e7873dba57a6e8d 100644 (file)
@@ -103,6 +103,11 @@ foreach ($diff as $file) {
 // the config.h needs special care
 $prepend_config_h = '
 #include <php_compat.h>
+
+#ifndef PHP_WIN32
+# include <php_config.h>
+#endif
+
 #undef PACKAGE_NAME
 #undef PACKAGE_VERSION
 #undef PACKAGE_TARNAME