Revision: 564
http://www.exim.org/viewvc/pcre2?view=rev&revision=564
Author: ph10
Date: 2016-10-13 17:08:08 +0100 (Thu, 13 Oct 2016)
Log Message:
-----------
Add test for bug already fixed by the refactoring.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/testdata/testinput2
code/trunk/testdata/testoutput2
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2016-10-11 16:40:09 UTC (rev 563)
+++ code/trunk/ChangeLog 2016-10-13 16:08:08 UTC (rev 564)
@@ -27,6 +27,8 @@
the name "DEFINE" exists. PCRE2 now does likewise.
(d) A recursion condition test such as (?(R2)...) must now refer to an
existing subpattern.
+ (e) A conditional recursion test such as (?(R)...) misbehaved if there was a
+ group whose name began with "R".
One effect of the refactoring is that some error numbers and messages have
changed, and the pattern offset given for compiling errors is not always the
Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2 2016-10-11 16:40:09 UTC (rev 563)
+++ code/trunk/testdata/testinput2 2016-10-13 16:08:08 UTC (rev 564)
@@ -4888,4 +4888,8 @@
/[a-\d]+/
a-a9-a
+/(?<RA>abc)(?(R)xyz)/B
+
+/(?<R>abc)(?(R)xyz)/B
+
# End of testinput2
Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2 2016-10-11 16:40:09 UTC (rev 563)
+++ code/trunk/testdata/testoutput2 2016-10-13 16:08:08 UTC (rev 564)
@@ -15306,6 +15306,34 @@
Failed: error 150 at offset 5: invalid range in character class
a-a9-a
+/(?<RA>abc)(?(R)xyz)/B
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ abc
+ Ket
+ Cond
+ Cond recurse any
+ xyz
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?<R>abc)(?(R)xyz)/B
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ abc
+ Ket
+ Cond
+ 1 Cond ref
+ xyz
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
# End of testinput2
Error -63: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data