[Pcre-svn] [1299] code/trunk: Move some tests from testinput…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [1299] code/trunk: Move some tests from testinput2 to testinput1 because they are now
Revision: 1299
          http://vcs.pcre.org/viewvc?view=rev&revision=1299
Author:   ph10
Date:     2013-03-22 17:23:09 +0000 (Fri, 22 Mar 2013)


Log Message:
-----------
Move some tests from testinput2 to testinput1 because they are now
Perl-compatible.

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/testdata/testinput1
    code/trunk/testdata/testinput2
    code/trunk/testdata/testoutput1
    code/trunk/testdata/testoutput2


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2013-03-22 16:13:13 UTC (rev 1298)
+++ code/trunk/ChangeLog    2013-03-22 17:23:09 UTC (rev 1299)
@@ -120,6 +120,10 @@
     (2) Previously, backtracking verbs were confined within assertions. This is 
     no longer the case, except for (*ACCEPT). Again, this sometimes improves
     Perl compatibility, and sometimes does not.
+    
+32. A number of tests that were in test 2 because Perl did things differently 
+    have been moved to test 1, because either Perl or PCRE has changed, and 
+    these tests are now compatible.



Version 8.32 30-November-2012

Modified: code/trunk/testdata/testinput1
===================================================================
--- code/trunk/testdata/testinput1    2013-03-22 16:13:13 UTC (rev 1298)
+++ code/trunk/testdata/testinput1    2013-03-22 17:23:09 UTC (rev 1299)
@@ -5444,4 +5444,82 @@
 /(?>a(*COMMIT)c)d|abd/
     abd


+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+    ac 
+    
+/-- These tests were formerly in test 2, but changes in PCRE and Perl have
+    made them compatible. --/
+    
+/^(a)?(?(1)a|b)+$/
+    *** Failers
+    a
+
+/(?=a\Kb)ab/
+    ab 
+
+/(?!a\Kb)ac/
+    ac 
+    
+/^abc(?<=b\Kc)d/
+    abcd
+
+/^abc(?<!b\Kq)d/
+    abcd
+
+
+/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
+    AAAC
+
+/^((abc|abcx)(*THEN)y|abcd)/
+    abcd
+    *** Failers 
+    abcxy 
+    
+/^((yes|no)(*THEN)(*F))?/
+  yes
+
+/(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   C? (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   C? (*THEN)  | A D) \s* z/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   (?:C|) (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   C{0,6} (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCEBefgBhiBqz
+
+/(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
+AbcdCEBefgBhiBqz
+
+/(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+
+/(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+    ac
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+    ac
+
+/--------/
+    
 /-- End of testinput1 --/


Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2    2013-03-22 16:13:13 UTC (rev 1298)
+++ code/trunk/testdata/testinput2    2013-03-22 17:23:09 UTC (rev 1299)
@@ -313,12 +313,6 @@
     *** Failers
     fooabar


-/This one is here because Perl 5.005_02 doesn't fail it/I
-
-/^(a)?(?(1)a|b)+$/I
-    *** Failers
-    a
-
 /This one is here because Perl behaves differently; see also the following/I


 /^(a\1?){4}$/I
@@ -2939,7 +2933,7 @@
     xxxxabcde\P
     xxxxabcde\P\P


-/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+/-- This is not in the Perl-compatible test because Perl seems currently to be
     broken and not behaving as specified in that it *does* bumpalong after
     hitting (*COMMIT). --/


@@ -2985,28 +2979,12 @@

/^(?&t)*(?(DEFINE)(?<t>.))$/BZ

-/ -- 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
+/ -- This one is here because Perl gives the match as "b" rather than "ab". I
      believe this to be a Perl bug. --/  


-/(?=a\Kb)ab/
-    ab 
-
-/(?!a\Kb)ac/
-    ac 
-    
-/^abc(?<=b\Kc)d/
-    abcd
-
-/^abc(?<!b\Kq)d/
-    abcd
-
 /(?>a\Kb)z|(ab)/
     ab 


-/----------------------/
-
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/

 /abc(*MARK:)pqr/
@@ -3021,7 +2999,7 @@
 /A(*COMMIT)B/+K
     ACABX


-/--- These should be different, but in Perl 5.11 are not, which I think
+/--- These should be different, but in Perl they are not, which I think
      is a bug in Perl. ---/


 /A(*THEN)B|A(*THEN)C/K
@@ -3030,12 +3008,6 @@
 /A(*PRUNE)B|A(*PRUNE)C/K
     AC


-/--- This should fail; the SKIP advances by one, but when we get to AC, the
-     PRUNE kills it. Perl behaves differently. ---/ 
-    
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
-    AAAC
-
 /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
 though PCRE does. ---/


@@ -3061,7 +3033,7 @@
 /^(ab (c+(*FAIL)cd) | xyz)/x
     abcccd  


-/--- Perl 5.11 gets some of these wrong ---/
+/--- Perl gets some of these wrong ---/

 /(?>.(*ACCEPT))*?5/
     abcde
@@ -3121,14 +3093,6 @@
 /X\H++\R/BZ
     X\x0d\x0a


-/-- 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


@@ -3453,52 +3417,6 @@
 /a(?:.(*THEN:ABC))*?a/ims
     \Mabbbbbbbbbbbbbbbbbbbbba


-/-- These tests are in agreement with development Perl 5.015, which has fixed
-    some things, but they don't all work with 5.012, so they aren't in the
-    Perl-compatible tests. Those after the first come from Perl's own test
-    files. --/
-    
-/^((yes|no)(*THEN)(*F))?/
-  yes
-
-/(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   C? (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   C? (*THEN)  | A D) \s* z/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   (?:C|) (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   C{0,6} (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCEBefgBhiBqz
-
-/(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
-AbcdCEBefgBhiBqz
-
-/(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-
-/(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-
-/-----------------------------------------------/  
-
 /^(?>a+)(?>(z+))\w/BZ
     aaaazzzzb
     ** Failers
@@ -3751,24 +3669,9 @@
     \r\r\r\P
     \r\r\r\P\P     


-/-- These two are here because Perl does not match: it seems to allow the
-COMMIT to escape from the assertion. --/
-
-/(?=a(*COMMIT)b|ac)ac|ac/
-    ac
-
-/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
-    ac
-
 "AB(C(D))(E(F))?(?(?=\2)(?=\4))"
     ABCDGHI\O03


-/-- This one is here because Perl does not confine the *COMMIT to the 
-assertion, and therefore fails the entire subroutine call. --/ 
-    
-/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
-    ac 
-    
 /-- These are all run as real matches in test 1; here we are just checking the
 settings of the anchored and startline bits. --/ 


@@ -3915,6 +3818,6 @@
 /^(A(*THEN)B|A(*THEN)D)/
     AD           


-/-- End of Perl diffences --/
+/-------------------------/

/-- End of testinput2 --/

Modified: code/trunk/testdata/testoutput1
===================================================================
--- code/trunk/testdata/testoutput1    2013-03-22 16:13:13 UTC (rev 1298)
+++ code/trunk/testdata/testoutput1    2013-03-22 17:23:09 UTC (rev 1299)
@@ -8973,4 +8973,111 @@
     abd
 No match


+/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
+    ac 
+ 0: ac
+ 1: <unset>
+ 2: c
+    
+/-- These tests were formerly in test 2, but changes in PCRE and Perl have
+    made them compatible. --/
+    
+/^(a)?(?(1)a|b)+$/
+    *** Failers
+No match
+    a
+No match
+
+/(?=a\Kb)ab/
+    ab 
+ 0: b
+
+/(?!a\Kb)ac/
+    ac 
+ 0: ac
+    
+/^abc(?<=b\Kc)d/
+    abcd
+ 0: cd
+
+/^abc(?<!b\Kq)d/
+    abcd
+ 0: abcd
+
+
+/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
+    AAAC
+No match, mark = A
+
+/^((abc|abcx)(*THEN)y|abcd)/
+    abcd
+ 0: abcd
+ 1: abcd
+    *** Failers 
+No match
+    abcxy 
+No match
+    
+/^((yes|no)(*THEN)(*F))?/
+  yes
+No match
+
+/(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   C? (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   C? (*THEN)  | A D) \s* z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   (?:C|) (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   C{0,6} (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
+AbcdCEBefgBhiBqz
+No match
+
+/(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
+AbcdCBefgBhiBqz
+No match
+
+/(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
+AbcdCBefgBhiBqz
+No match
+
+/(?=a(*COMMIT)b|ac)ac|ac/
+    ac
+No match
+
+/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
+    ac
+No match
+
+/--------/
+    
 /-- End of testinput1 --/


Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2    2013-03-22 16:13:13 UTC (rev 1298)
+++ code/trunk/testdata/testoutput2    2013-03-22 17:23:09 UTC (rev 1299)
@@ -824,22 +824,6 @@
     fooabar
 No match


-/This one is here because Perl 5.005_02 doesn't fail it/I
-Capturing subpattern count = 0
-No options
-First char = 'T'
-Need char = 't'
-
-/^(a)?(?(1)a|b)+$/I
-Capturing subpattern count = 1
-Options: anchored
-No first char
-No need char
-    *** Failers
-No match
-    a
-No match
-
 /This one is here because Perl behaves differently; see also the following/I
 Capturing subpattern count = 0
 No options
@@ -10357,7 +10341,7 @@
     xxxxabcde\P\P
 Partial match: abcde


-/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+/-- This is not in the Perl-compatible test because Perl seems currently to be
     broken and not behaving as specified in that it *does* bumpalong after
     hitting (*COMMIT). --/


@@ -10553,34 +10537,14 @@
         End
 ------------------------------------------------------------------


-/ -- 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
+/ -- This one is here because Perl gives the match as "b" rather than "ab". I
      believe this to be a Perl bug. --/  


-/(?=a\Kb)ab/
-    ab 
- 0: b
-
-/(?!a\Kb)ac/
-    ac 
- 0: ac
-    
-/^abc(?<=b\Kc)d/
-    abcd
- 0: cd
-
-/^abc(?<!b\Kq)d/
-    abcd
- 0: abcd
-
 /(?>a\Kb)z|(ab)/
     ab 
  0: ab
  1: ab


-/----------------------/
-
/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
Failed: recursive call could loop indefinitely at offset 31

@@ -10600,7 +10564,7 @@
     ACABX
 No match


-/--- These should be different, but in Perl 5.11 are not, which I think
+/--- These should be different, but in Perl they are not, which I think
      is a bug in Perl. ---/


 /A(*THEN)B|A(*THEN)C/K
@@ -10611,13 +10575,6 @@
     AC
 No match


-/--- This should fail; the SKIP advances by one, but when we get to AC, the
-     PRUNE kills it. Perl behaves differently. ---/ 
-    
-/A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
-    AAAC
-No match, mark = A
-
 /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
 though PCRE does. ---/


@@ -10651,7 +10608,7 @@
     abcccd  
 No match


-/--- Perl 5.11 gets some of these wrong ---/
+/--- Perl gets some of these wrong ---/

 /(?>.(*ACCEPT))*?5/
     abcde
@@ -10830,18 +10787,6 @@
     X\x0d\x0a
 No match


-/-- 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 at offset 3: abc
@@ -11765,65 +11710,6 @@
 Minimum match() recursion limit = 45
  0: abbbbbbbbbbbbbbbbbbbbba


-/-- These tests are in agreement with development Perl 5.015, which has fixed
-    some things, but they don't all work with 5.012, so they aren't in the
-    Perl-compatible tests. Those after the first come from Perl's own test
-    files. --/
-    
-/^((yes|no)(*THEN)(*F))?/
-  yes
-No match
-
-/(A (.*)   C? (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   C? (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   C? (*THEN)  | A D) \s* (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   C? (*THEN)  | A D) \s* z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   (?:C|) (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   (?:C|) (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   C{0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   C{0,6} (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   (CE){0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCEBefgBhiBqz
-No match
-
-/(A (.*)   (CE){0,6} (*THEN)  | A D) z/x
-AbcdCEBefgBhiBqz
-No match
-
-/(A (.*)   (CE*){0,6} (*THEN)  | A D) (*FAIL)/x
-AbcdCBefgBhiBqz
-No match
-
-/(A (.*)   (CE*){0,6} (*THEN)  | A D) z/x
-AbcdCBefgBhiBqz
-No match
-
-/-----------------------------------------------/  
-
 /^(?>a+)(?>(z+))\w/BZ
 ------------------------------------------------------------------
         Bra
@@ -12340,31 +12226,11 @@
     \r\r\r\P\P     
  0: \x0d\x0d


-/-- These two are here because Perl does not match: it seems to allow the
-COMMIT to escape from the assertion. --/
-
-/(?=a(*COMMIT)b|ac)ac|ac/
-    ac
-No match
-
-/(?=a(*COMMIT)b|(ac)) ac | (a)c/x
-    ac
-No match
-
 "AB(C(D))(E(F))?(?(?=\2)(?=\4))"
     ABCDGHI\O03
 Matched, but too many substrings
  0: ABCD


-/-- This one is here because Perl does not confine the *COMMIT to the 
-assertion, and therefore fails the entire subroutine call. --/ 
-    
-/((?=a(*COMMIT)b)ab|ac){0}(?:(?1)|a(c))/
-    ac 
- 0: ac
- 1: <unset>
- 2: c
-    
 /-- These are all run as real matches in test 1; here we are just checking the
 settings of the anchored and startline bits. --/ 


@@ -12731,6 +12597,6 @@
0: AD
1: AD

-/-- End of Perl diffences --/
+/-------------------------/

/-- End of testinput2 --/