Revision: 751
http://www.exim.org/viewvc/pcre2?view=rev&revision=751
Author: ph10
Date: 2017-04-16 14:03:30 +0100 (Sun, 16 Apr 2017)
Log Message:
-----------
Improve testing coverage with updates to pcre2test and test files; also get rid
of redundant code in pcre2_match().
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/src/pcre2_match.c
code/trunk/src/pcre2test.c
code/trunk/testdata/testinput1
code/trunk/testdata/testinput15
code/trunk/testdata/testinput2
code/trunk/testdata/testinput22
code/trunk/testdata/testinput4
code/trunk/testdata/testinput5
code/trunk/testdata/testoutput1
code/trunk/testdata/testoutput15
code/trunk/testdata/testoutput2
code/trunk/testdata/testoutput22-8
code/trunk/testdata/testoutput4
code/trunk/testdata/testoutput5
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/ChangeLog 2017-04-16 13:03:30 UTC (rev 751)
@@ -137,7 +137,10 @@
26. Correct an incorrect cast in pcre2_valid_utf.c
+27. Update pcre2test, remove some unused code in pcre2_match(), and upgrade the
+tests to improve coverage.
+
Version 10.23 14-February-2017
------------------------------
Modified: code/trunk/src/pcre2_match.c
===================================================================
--- code/trunk/src/pcre2_match.c 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/src/pcre2_match.c 2017-04-16 13:03:30 UTC (rev 751)
@@ -298,13 +298,13 @@
cb.callout_string_length =
*lengthptr - (1 + 4*LINK_SIZE) - 2;
}
-
+
/* The original matching code (pre 10.30) worked directly with the ovector
passed by the user, and this was passed to callouts. Now that the working
ovector is in the backtracking frame, it no longer needs to reserve space for
the overall match offsets (which would waste space in the frame). For backward
compatibility, however, we pass capture_top and offset_vector to the callout as
-if for the extended ovector, and we ensure that the first two slots are unset
+if for the extended ovector, and we ensure that the first two slots are unset
by preserving and restoring their current contents. */
save0 = Fovector[-2];
@@ -628,7 +628,7 @@
if ((newsize / 1024) > mb->heap_limit)
{
PCRE2_SIZE maxsize = ((mb->heap_limit * 1024)/frame_size) * frame_size;
- if (mb->frame_vector_size == maxsize) return PCRE2_ERROR_HEAPLIMIT;
+ if (mb->frame_vector_size >= maxsize) return PCRE2_ERROR_HEAPLIMIT;
newsize = maxsize;
}
@@ -810,15 +810,15 @@
RRETURN(MATCH_NOMATCH);
/* Also fail if PCRE2_ENDANCHORED is set and the end of the match is not
- the end of the subject. After (*ACCEPT) we fail the entire match (at this
+ the end of the subject. After (*ACCEPT) we fail the entire match (at this
position) but backtrack on reaching the end of the pattern. */
if (Feptr < mb->end_subject &&
((mb->moptions | mb->poptions) & PCRE2_ENDANCHORED) != 0)
- {
+ {
if (Fop == OP_END) RRETURN(MATCH_NOMATCH);
- return MATCH_NOMATCH;
- }
+ return MATCH_NOMATCH;
+ }
/* We have a successful match of the whole pattern. Record the result and
then do a direct return from the function. If there is space in the offset
@@ -3057,16 +3057,20 @@
}
Feptr += Lmin;
break;
+
+ /* This OP_ANYBYTE case will never be reached because \C gets turned
+ into OP_ALLANY in non-UTF mode. Cut out the code so that coverage
+ reports don't complain about it's never being used. */
- case OP_ANYBYTE:
- if (Feptr > mb->end_subject - Lmin)
- {
- SCHECK_PARTIAL();
- RRETURN(MATCH_NOMATCH);
- }
- Feptr += Lmin;
- break;
-
+/* case OP_ANYBYTE:
+* if (Feptr > mb->end_subject - Lmin)
+* {
+* SCHECK_PARTIAL();
+* RRETURN(MATCH_NOMATCH);
+* }
+* Feptr += Lmin;
+* break;
+*/
case OP_ANYNL:
for (i = 1; i <= Lmin; i++)
{
@@ -3573,6 +3577,7 @@
switch(fc)
{
default: RRETURN(MATCH_NOMATCH);
+
case CHAR_CR:
if (Feptr < mb->end_subject && UCHAR21(Feptr) == CHAR_LF) Feptr++;
break;
@@ -3700,6 +3705,7 @@
switch(fc)
{
default: RRETURN(MATCH_NOMATCH);
+
case CHAR_CR:
if (Feptr < mb->end_subject && *Feptr == CHAR_LF) Feptr++;
break;
@@ -5004,15 +5010,10 @@
Lnext_branch = Fecode + GET(Fecode, 1);
if (*Lnext_branch != OP_ALT) break;
- /* This is never the final branch */
+ /* This is never the final branch. We do not need to test for MATCH_THEN
+ here because this code is not used when there is a THEN in the pattern. */
RMATCH(Fecode + PRIV(OP_lengths)[*Fecode], RM1);
- if (rrc == MATCH_THEN)
- {
- if (mb->verb_ecode_ptr < Lnext_branch &&
- (*Fecode == OP_ALT || *Lnext_branch == OP_ALT))
- rrc = MATCH_NOMATCH;
- }
if (rrc != MATCH_NOMATCH) RRETURN(rrc);
Fecode = Lnext_branch;
}
Modified: code/trunk/src/pcre2test.c
===================================================================
--- code/trunk/src/pcre2test.c 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/src/pcre2test.c 2017-04-16 13:03:30 UTC (rev 751)
@@ -324,7 +324,7 @@
/* If we have 8-bit support, default to it; if there is also 16-or 32-bit
support, it can be selected by a command-line option. If there is no 8-bit
-support, there must be 16- or 32-bit support, so default to one of them. The
+support, there must be 16-bit or 32-bit support, so default to one of them. The
config function, JIT stack, contexts, and version string are the same in all
modes, so use the form of the first that is available. */
@@ -336,7 +336,6 @@
#define PCRE2_REAL_GENERAL_CONTEXT pcre2_real_general_context_8
#define PCRE2_REAL_COMPILE_CONTEXT pcre2_real_compile_context_8
#define PCRE2_REAL_MATCH_CONTEXT pcre2_real_match_context_8
-#define VERSION_TYPE PCRE2_UCHAR8
#elif defined SUPPORT_PCRE2_16
#define DEFAULT_TEST_MODE PCRE16_MODE
@@ -3725,6 +3724,7 @@
pattern_info(int what, void *where, BOOL unsetok)
{
int rc;
+PCRE2_PATTERN_INFO(rc, compiled_code, what, NULL); /* Exercise the code */
PCRE2_PATTERN_INFO(rc, compiled_code, what, where);
if (rc >= 0) return 0;
if (rc != PCRE2_ERROR_UNSET || !unsetok)
@@ -4056,6 +4056,7 @@
if ((pat_patctl.control & CTL_INFO) != 0)
{
+ int rc;
void *nametable;
uint8_t *start_bits;
BOOL heap_limit_set, match_limit_set, depth_limit_set;
@@ -4064,6 +4065,11 @@
depth_limit, heap_limit, match_limit, minlength, nameentrysize, namecount,
newline_convention;
+ /* Exercise the error route. */
+
+ PCRE2_PATTERN_INFO(rc, compiled_code, 999, NULL);
+ (void)rc;
+
/* These info requests may return PCRE2_ERROR_UNSET. */
switch(pattern_info(PCRE2_INFO_HEAPLIMIT, &heap_limit, TRUE))
@@ -5363,7 +5369,7 @@
/*************************************************
-* Check match or depth limit *
+* Check heap, match or depth limit *
*************************************************/
/* This is used for DFA, normal, and JIT fast matching. For DFA matching it
@@ -5423,7 +5429,7 @@
else
PCRE2_MATCH(capcount, compiled_code, pp, ulen, dat_datctl.offset,
dat_datctl.options, match_data, PTR(dat_context));
-
+
if (capcount == errnumber)
{
min = mid;
@@ -6720,7 +6726,7 @@
if ((dat_datctl.control & CTL_FINDLIMITS) != 0)
{
capcount = 0; /* This stops compiler warnings */
-
+
if ((dat_datctl.control & CTL_DFA) == 0)
{
if (FLD(compiled_code, executable_jit) == NULL ||
@@ -7484,6 +7490,7 @@
int
main(int argc, char **argv)
{
+uint32_t temp;
uint32_t yield = 0;
uint32_t op = 1;
BOOL notdone = TRUE;
@@ -7528,6 +7535,20 @@
return 1;
}
+/* Check that bad options are diagnosed. */
+
+if (PCRE2_CONFIG(999, NULL) != PCRE2_ERROR_BADOPTION ||
+ PCRE2_CONFIG(999, &temp) != PCRE2_ERROR_BADOPTION)
+ {
+ fprintf(stderr, "** Error in pcre2_config(): bad option not diagnosed\n");
+ return 1;
+ }
+
+/* This configuration option is now obsolete, but running a quick check ensures
+that its code is covered. */
+
+(void)PCRE2_CONFIG(PCRE2_CONFIG_STACKRECURSE, &temp);
+
/* Get buffers from malloc() so that valgrind will check their misuse when
debugging. They grow automatically when very long lines are read. The 16-
and 32-bit buffers (pbuffer16, pbuffer32) are obtained only if needed. */
@@ -7571,12 +7592,17 @@
goto EXIT;
}
- /* Select operating mode */
+ /* Select operating mode. Ensure that pcre2_config() is called in 16-bit
+ and 32-bit modes because that won't happen naturally when 8-bit is also
+ configured. Also call some other functions that are not otherwise used. This
+ means that a coverage report won't claim there are uncalled functions. */
if (strcmp(arg, "-8") == 0)
{
#ifdef SUPPORT_PCRE2_8
test_mode = PCRE8_MODE;
+ (void)pcre2_set_bsr_8(pat_context8, 999);
+ (void)pcre2_set_newline_8(pat_context8, 999);
#else
fprintf(stderr,
"** This version of PCRE2 was built without 8-bit support\n");
@@ -7583,10 +7609,14 @@
exit(1);
#endif
}
+
else if (strcmp(arg, "-16") == 0)
{
#ifdef SUPPORT_PCRE2_16
test_mode = PCRE16_MODE;
+ (void)pcre2_config_16(PCRE2_CONFIG_VERSION, NULL);
+ (void)pcre2_set_bsr_16(pat_context16, 999);
+ (void)pcre2_set_newline_16(pat_context16, 999);
#else
fprintf(stderr,
"** This version of PCRE2 was built without 16-bit support\n");
@@ -7593,10 +7623,14 @@
exit(1);
#endif
}
+
else if (strcmp(arg, "-32") == 0)
{
#ifdef SUPPORT_PCRE2_32
test_mode = PCRE32_MODE;
+ (void)pcre2_config_32(PCRE2_CONFIG_VERSION, NULL);
+ (void)pcre2_set_bsr_32(pat_context32, 999);
+ (void)pcre2_set_newline_32(pat_context32, 999);
#else
fprintf(stderr,
"** This version of PCRE2 was built without 32-bit support\n");
@@ -7848,8 +7882,14 @@
G(dat_context,BITS) = G(pcre2_match_context_copy_,BITS)(G(default_dat_context,BITS)); \
G(match_data,BITS) = G(pcre2_match_data_create_,BITS)(max_oveccount, G(general_context,BITS))
-/* Call the appropriate functions for the current mode. */
+#define CONTEXTTESTS \
+ (void)G(pcre2_set_max_pattern_length_,BITS)(G(pat_context,BITS), 0); \
+ (void)G(pcre2_set_offset_limit_,BITS)(G(dat_context,BITS), 0); \
+ (void)G(pcre2_set_recursion_memory_management_,BITS)(G(dat_context,BITS), my_malloc, my_free, NULL)
+/* Call the appropriate functions for the current mode, and exercise some
+functions that are not otherwise called. */
+
#ifdef SUPPORT_PCRE2_8
#undef BITS
#define BITS 8
@@ -7856,6 +7896,7 @@
if (test_mode == PCRE8_MODE)
{
CREATECONTEXTS;
+ CONTEXTTESTS;
}
#endif
@@ -7865,6 +7906,7 @@
if (test_mode == PCRE16_MODE)
{
CREATECONTEXTS;
+ CONTEXTTESTS;
}
#endif
@@ -7874,6 +7916,7 @@
if (test_mode == PCRE32_MODE)
{
CREATECONTEXTS;
+ CONTEXTTESTS;
}
#endif
Modified: code/trunk/testdata/testinput1
===================================================================
--- code/trunk/testdata/testinput1 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput1 2017-04-16 13:03:30 UTC (rev 751)
@@ -5917,4 +5917,7 @@
/^(?(?!(a)(*ACCEPT))def|abc)/
abc
+/^(?1)\d{3}(a)/
+ a123a
+
# End of testinput1
Modified: code/trunk/testdata/testinput15
===================================================================
--- code/trunk/testdata/testinput15 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput15 2017-04-16 13:03:30 UTC (rev 751)
@@ -165,4 +165,7 @@
/(|]+){2,2452}/
(|]+){2,2452}
+/(*LIMIT_HEAP=21)\[(a)]{60}/expand
+ \[a]{60}
+
# End of testinput15
Modified: code/trunk/testdata/testinput2
===================================================================
--- code/trunk/testdata/testinput2 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput2 2017-04-16 13:03:30 UTC (rev 751)
@@ -5054,4 +5054,195 @@
/(?(VERSION>=999)yes|no)^bc/I
+/(*LIMIT_HEAP=0)xxx/I
+
+/\d{0,3}(*:abc)(?C1)xxx/callout_info
+
+# ----------------------------------------------------------------------
+
+# These are a whole pile of tests that touch lines of code that are not
+# used by any other tests (at least when these were created).
+
+/^a+?x/i,no_start_optimize,no_auto_possess
+\= Expect no match
+ aaa
+
+/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess
+\= Expect no match
+ bbb
+ cc
+
+/^X\S/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\W/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\H/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\h/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\V/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\v/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\h/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+
+/^X\V/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n
+
+/^X\v/no_start_optimize,no_auto_possess
+\= Expect no match
+ XX
+
+/^X.+?/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\R+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ XX
+
+/^X\H+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\h+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\V+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ X\n
+
+/^X\D+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ X9
+
+/^X\S+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ X\n
+
+/^X\W+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ XX
+
+/^X.+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+
+/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\r\=ps
+
+/^X\R+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+ X\n\r\n
+ X\n\rY
+ X\n\nY
+ X\n\x{0c}Y
+
+/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+ X\n\r\n
+ X\n\rY
+ X\n\nY
+ X\n\x{0c}Y
+
+/^X\H+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\t
+ XYY
+
+/^X\h+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+ X\tY
+
+/^X\V+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+ XYY
+
+/^X\v+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+ X\nY
+
+/^X\D+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY9
+ XYY
+
+/^X\d+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X99
+ X9Y
+
+/^X\S+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+ XYY
+
+/^X\s+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+ X\nY
+
+/^X\W+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X.A
+ X++
+
+/^X\w+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ Xa.
+ Xaa
+
+/^X.{1,3}Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ Xa.bd
+
+/^X\h+Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+ X\tY
+
+/^X\V+Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+ XYY
+
+/^(X(*THEN)Y|AB){0}(?1)/
+ ABX
+\= Expect no match
+ XAB
+
+/^(?!A(?C1)B)C/
+ ABC\=callout_error=1
+
+/^(?(?!A(?C1)B)C)/
+ ABC\=callout_error=1
+
+# ----------------------------------------------------------------------
+
# End of testinput2
Modified: code/trunk/testdata/testinput22
===================================================================
--- code/trunk/testdata/testinput22 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput22 2017-04-16 13:03:30 UTC (rev 751)
@@ -95,4 +95,8 @@
\= Expect no match in 8-bit mode
a\x{100}b
+/^ab\C/utf,no_start_optimize
+\= Expect no match - tests \C at end of subject
+ ab
+
# End of testinput22
Modified: code/trunk/testdata/testinput4
===================================================================
--- code/trunk/testdata/testinput4 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput4 2017-04-16 13:03:30 UTC (rev 751)
@@ -1627,6 +1627,11 @@
/[z\x{1f88}]+/i,utf
\x{1f88}\x{1f80}
+# Check a reference with more than one other case
+
+/^(\x{00b5})\1{2}$/i,utf
+ \x{00b5}\x{039c}\x{03bc}
+
# Characters with more than one other case; test in classes
/[z\x{00b5}]+/i,utf
@@ -2288,4 +2293,12 @@
/(?(?=.*b)(?=.*b)\pL|.*c)/
11bb
+/^\x{123}+?$/utf,no_auto_possess
+ \x{123}\x{123}\x{123}
+
+/^\x{123}+?$/i,utf,no_auto_possess
+ \x{123}\x{122}\x{123}
+\= Expect no match
+ \x{123}\x{124}\x{123}
+
# End of testinput4
Modified: code/trunk/testdata/testinput5
===================================================================
--- code/trunk/testdata/testinput5 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testinput5 2017-04-16 13:03:30 UTC (rev 751)
@@ -15,7 +15,7 @@
/^[\p{Arabic}]/utf
\= Expect no match
\x{061c}
-
+
/^[[:graph:]]+$/utf,ucp
\= Expect no match
\x{61c}
@@ -39,14 +39,14 @@
/^[[:^print:]]+$/utf,ucp
\x{09}\x{1D}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
\x{2068}\x{2069}
-
+
# Perl does not consider U+180e to be a space character. It is true that it
# does not appear in the Unicode PropList.txt file as such, but in many other
# sources it is listed as a space, and has been treated as such in PCRE for
-# a long time.
+# a long time.
/^>[[:blank:]]*/utf,ucp
- >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
+ >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
/^A\s+Z/utf,ucp
A\x{85}\x{180e}\x{2005}Z
@@ -54,7 +54,7 @@
/^A[\s]+Z/utf,ucp
A\x{2005}Z
A\x{85}\x{2005}Z
-
+
/^[[:graph:]]+$/utf,ucp
\= Expect no match
\x{180e}
@@ -106,7 +106,7 @@
/\x{0041}\x{2262}\x{0391}\x{002e}/IB,utf
\x{0041}\x{2262}\x{0391}\x{002e}
-
+
/.{3,5}X/IB,utf
\x{212ab}\x{212ab}\x{212ab}\x{861}X
@@ -118,23 +118,23 @@
\= Expect no match
c
\x{ff}
- \x{100}
+ \x{100}
/^[^ab]/IB,utf
c
\x{ff}
- \x{100}
-\= Expect no match
+ \x{100}
+\= Expect no match
aaa
-
+
/\x{100}*(\d+|"(?1)")/utf
1234
- "1234"
+ "1234"
\x{100}1234
- "\x{100}1234"
- \x{100}\x{100}12ab
- \x{100}\x{100}"12"
-\= Expect no match
+ "\x{100}1234"
+ \x{100}\x{100}12ab
+ \x{100}\x{100}"12"
+\= Expect no match
\x{100}\x{100}abcd
/\x{100}*/IB,utf
@@ -150,7 +150,7 @@
\x{104}
\= Expect no match
\x{105}
- \x{ff}
+ \x{ff}
/[\xFF]/IB
>\xff<
@@ -160,18 +160,18 @@
/[Ä-Ü]/utf
Ö # Matches without Study
\x{d6}
-
+
/[Ä-Ü]/utf
Ö <-- Same with Study
\x{d6}
-
+
/[\x{c4}-\x{dc}]/utf
Ö # Matches without Study
- \x{d6}
+ \x{d6}
/[\x{c4}-\x{dc}]/utf
Ö <-- Same with Study
- \x{d6}
+ \x{d6}
/[^\x{100}]abc(xyz(?1))/IB,utf
@@ -185,10 +185,10 @@
/\W/utf
A.B
- A\x{100}B
-
+ A\x{100}B
+
/\w/utf
- \x{100}X
+ \x{100}X
/^\ሴ/IB,utf
@@ -197,7 +197,7 @@
()()()()()()()()()()
()()()()()()()()()()
A (x) (?41) B/x,utf
- AxxB
+ AxxB
/^[\x{100}\E-\Q\E\x{150}]/B,utf
@@ -215,11 +215,11 @@
a\r\nb
a\x0bb
a\x0cb
- a\x{85}b
- a\x{2028}b
- a\x{2029}b
+ a\x{85}b
+ a\x{2028}b
+ a\x{2029}b
\= Expect no match
- a\n\rb
+ a\n\rb
/^a\R*b/bsr=unicode,utf
ab
@@ -228,9 +228,9 @@
a\r\nb
a\x0bb
a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
+ a\x{85}b
+ a\n\rb
+ a\n\r\x{85}\x0cb
/^a\R+b/bsr=unicode,utf
a\nb
@@ -238,20 +238,20 @@
a\r\nb
a\x0bb
a\x0c\x{2028}\x{2029}b
- a\x{85}b
- a\n\rb
- a\n\r\x{85}\x0cb
+ a\x{85}b
+ a\n\rb
+ a\n\r\x{85}\x0cb
\= Expect no match
- ab
+ ab
/^a\R{1,3}b/bsr=unicode,utf
a\nb
a\n\rb
a\n\r\x{85}b
- a\r\n\r\nb
- a\r\n\r\n\r\nb
+ a\r\n\r\nb
+ a\r\n\r\n\r\nb
a\n\r\n\rb
- a\n\n\r\nb
+ a\n\n\r\nb
\= Expect no match
a\n\n\n\rb
a\r
@@ -260,28 +260,28 @@
X X\x0a
X\x09X\x0b
\= Expect no match
- \x{a0} X\x0a
-
+ \x{a0} X\x0a
+
/\H*\h+\V?\v{3,4}/utf
\x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
\x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
\x09\x20\x{a0}\x0a\x0b\x0c
-\= Expect no match
+\= Expect no match
\x09\x20\x{a0}\x0a\x0b
-
+
/\H\h\V\v/utf
\x{3001}\x{3000}\x{2030}\x{2028}
X\x{180e}X\x{85}
\= Expect no match
- \x{2009} X\x0a
-
+ \x{2009} X\x0a
+
/\H*\h+\V?\v{3,4}/utf
\x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
\x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
\x09\x20\x{202f}\x0a\x0b\x0c
-\= Expect no match
+\= Expect no match
\x09\x{200a}\x{a0}\x{2028}\x0b
-
+
/[\h]/B,utf
>\x{1680}
@@ -295,8 +295,8 @@
/[\V]/B,utf
/.*$/newline=any,utf
- \x{1ec5}
-
+ \x{1ec5}
+
/a\Rb/I,bsr=anycrlf,utf
a\rb
a\nb
@@ -303,7 +303,7 @@
a\r\nb
\= Expect no match
a\x{85}b
- a\x0bb
+ a\x0bb
/a\Rb/I,bsr=unicode,utf
a\rb
@@ -310,8 +310,8 @@
a\nb
a\r\nb
a\x{85}b
- a\x0bb
-
+ a\x0bb
+
/a\R?b/I,bsr=anycrlf,utf
a\rb
a\nb
@@ -318,7 +318,7 @@
a\r\nb
\= Expect no match
a\x{85}b
- a\x0bb
+ a\x0bb
/a\R?b/I,bsr=unicode,utf
a\rb
@@ -325,27 +325,27 @@
a\nb
a\r\nb
a\x{85}b
- a\x0bb
-
+ a\x0bb
+
/.*a.*=.b.*/utf,newline=any
QQQ\x{2029}ABCaXYZ=!bPQR
\= Expect no match
a\x{2029}b
- \x61\xe2\x80\xa9\x62
+ \x61\xe2\x80\xa9\x62
/[[:a\x{100}b:]]/utf
/a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref
a\x{1234}b
- a\nb
+ a\nb
\= Expect no match
- ab
-
+ ab
+
/a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref
aXb
- a\nX\nX\x{1234}b
+ a\nX\nX\x{1234}b
\= Expect no match
- ab
+ ab
/(\x{de})\1/
\x{de}\x{de}
@@ -359,7 +359,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/Xa{2,4}?b/utf
X\=ps
Xa\=ps
@@ -366,7 +366,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/Xa{2,4}+b/utf
X\=ps
Xa\=ps
@@ -373,7 +373,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/X\x{123}{2,4}b/utf
X\=ps
X\x{123}\=ps
@@ -380,7 +380,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X\x{123}{2,4}?b/utf
X\=ps
X\x{123}\=ps
@@ -387,7 +387,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X\x{123}{2,4}+b/utf
X\=ps
X\x{123}\=ps
@@ -394,7 +394,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X\x{123}{2,4}b/utf
\= Expect no match
Xx\=ps
@@ -402,7 +402,7 @@
X\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}\x{123}x\=ps
-
+
/X\x{123}{2,4}?b/utf
\= Expect no match
Xx\=ps
@@ -410,7 +410,7 @@
X\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}\x{123}x\=ps
-
+
/X\x{123}{2,4}+b/utf
\= Expect no match
Xx\=ps
@@ -418,7 +418,7 @@
X\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}x\=ps
X\x{123}\x{123}\x{123}\x{123}x\=ps
-
+
/X\d{2,4}b/utf
X\=ps
X3\=ps
@@ -425,7 +425,7 @@
X33\=ps
X333\=ps
X3333\=ps
-
+
/X\d{2,4}?b/utf
X\=ps
X3\=ps
@@ -432,7 +432,7 @@
X33\=ps
X333\=ps
X3333\=ps
-
+
/X\d{2,4}+b/utf
X\=ps
X3\=ps
@@ -446,7 +446,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/X\D{2,4}?b/utf
X\=ps
Xa\=ps
@@ -453,7 +453,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/X\D{2,4}+b/utf
X\=ps
Xa\=ps
@@ -467,7 +467,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X\D{2,4}?b/utf
X\=ps
X\x{123}\=ps
@@ -474,7 +474,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X\D{2,4}+b/utf
X\=ps
X\x{123}\=ps
@@ -488,7 +488,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/X[abc]{2,4}?b/utf
X\=ps
Xa\=ps
@@ -495,7 +495,7 @@
Xaa\=ps
Xaaa\=ps
Xaaaa\=ps
-
+
/X[abc]{2,4}+b/utf
X\=ps
Xa\=ps
@@ -509,7 +509,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X[abc\x{123}]{2,4}?b/utf
X\=ps
X\x{123}\=ps
@@ -516,7 +516,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X[abc\x{123}]{2,4}+b/utf
X\=ps
X\x{123}\=ps
@@ -530,7 +530,7 @@
Xzz\=ps
Xzzz\=ps
Xzzzz\=ps
-
+
/X[^a]{2,4}?b/utf
X\=ps
Xz\=ps
@@ -537,7 +537,7 @@
Xzz\=ps
Xzzz\=ps
Xzzzz\=ps
-
+
/X[^a]{2,4}+b/utf
X\=ps
Xz\=ps
@@ -551,7 +551,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X[^a]{2,4}?b/utf
X\=ps
X\x{123}\=ps
@@ -558,7 +558,7 @@
X\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\=ps
X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/X[^a]{2,4}+b/utf
X\=ps
X\x{123}\=ps
@@ -572,7 +572,7 @@
YXYY\=ps
YXYYY\=ps
YXYYYY\=ps
-
+
/(Y)X\1{2,4}?b/utf
YX\=ps
YXY\=ps
@@ -579,7 +579,7 @@
YXYY\=ps
YXYYY\=ps
YXYYYY\=ps
-
+
/(Y)X\1{2,4}+b/utf
YX\=ps
YXY\=ps
@@ -593,7 +593,7 @@
\x{123}X\x{123}\x{123}\=ps
\x{123}X\x{123}\x{123}\x{123}\=ps
\x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/(\x{123})X\1{2,4}?b/utf
\x{123}X\=ps
\x{123}X\x{123}\=ps
@@ -600,7 +600,7 @@
\x{123}X\x{123}\x{123}\=ps
\x{123}X\x{123}\x{123}\x{123}\=ps
\x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
-
+
/(\x{123})X\1{2,4}+b/utf
\x{123}X\=ps
\x{123}X\x{123}\=ps
@@ -642,13 +642,13 @@
AB\x{a0}xxx\x{85}XYZ
/\S \S/utf,tables=2
- \x{a2} \x{84}
+ \x{a2} \x{84}
'A#хц'Bx,newline=any,utf
'A#хц
PQ'Bx,newline=any,utf
-
+
/a+#хaa
z#XX?/Bx,newline=any,utf
@@ -665,13 +665,13 @@
/(\R*)(.)/s,utf
\r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
/(\R)*(.)/s,utf
\r\n
- \r\r\n\n\r
- \r\r\n\n\r\n
+ \r\r\n\n\r
+ \r\r\n\n\r\n
/[^\x{1234}]+/Ii,utf
@@ -692,7 +692,7 @@
/f.*/s,utf
for\=ph
-
+
/\x{d7ff}\x{e000}/utf
/\x{d800}/utf
@@ -781,7 +781,7 @@
/./utf,newline=crlf
\r\=ps
\r\=ph
-
+
/.{2,3}/utf,newline=crlf
\r\=ps
\r\=ph
@@ -839,9 +839,9 @@
/[\p{Nd}+-]+/IB,utf
1234
12-34
- 12+\x{661}-34
+ 12+\x{661}-34
\= Expect no match
- abcd
+ abcd
/(?:[\PPa*]*){8,}/
@@ -888,7 +888,7 @@
/\p{Zl}{2,3}+/B,utf
\x{2028}\x{2028}\x{2028}
-
+
/\p{Zl}/B,utf
/\p{Lu}{3}+/B,utf
@@ -908,8 +908,8 @@
/^\p{Cs}/utf
\x{dfff}\=no_utf_check
\= Expect no match
- \x{09f}
-
+ \x{09f}
+
/^\p{Mn}/utf
\x{1a1b}
@@ -927,60 +927,60 @@
\= Expect no match
X
\x{2c2}
-
+
/^\p{Zs}/utf
\ \
\x{a0}
\x{1680}
\x{2000}
- \x{2001}
+ \x{2001}
\= Expect no match
\x{2028}
- \x{200d}
-
+ \x{200d}
+
# These are here because Perl has problems with the negative versions of the
# properties and has changed how it behaves for caseless matching.
-
+
/\p{^Lu}/i,utf
1234
\= Expect no match
- ABC
+ ABC
/\P{Lu}/i,utf
1234
\= Expect no match
- ABC
+ ABC
/\p{Ll}/i,utf
a
Az
\= Expect no match
- ABC
+ ABC
/\p{Lu}/i,utf
A
- a\x{10a0}B
-\= Expect no match
+ a\x{10a0}B
+\= Expect no match
a
- \x{1d00}
+ \x{1d00}
/\p{Lu}/i,utf
A
aZ
\= Expect no match
- abc
+ abc
/[\x{c0}\x{391}]/i,utf
\x{c0}
- \x{e0}
+ \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
-# second was broken in all cases.
+# second was broken in all cases.
/^\x{023a}+?(\x{0130}+)/i,utf
\x{023a}\x{2c65}\x{0130}
-
+
/^\x{023a}+([^X])/i,utf
\x{023a}\x{2c65}X
@@ -998,25 +998,25 @@
/^\x{c0}$/i,utf
\x{c0}
- \x{e0}
+ \x{e0}
/^\x{e0}$/i,utf
\x{c0}
- \x{e0}
+ \x{e0}
# 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}])/utf
\x{c0}
- \x{e0}
+ \x{e0}
/(?i:[\x{c0}])/utf
\x{c0}
- \x{e0}
+ \x{e0}
-# These are PCRE's extra properties to help with Unicodizing \d etc.
+# These are PCRE's extra properties to help with Unicodizing \d etc.
/^\p{Xan}/utf
ABCD
@@ -1023,14 +1023,14 @@
1234
\x{6ca}
\x{a6c}
- \x{10a7}
+ \x{10a7}
\= Expect no match
- _ABC
+ _ABC
/^\p{Xan}+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
\= Expect no match
- _ABC
+ _ABC
/^\p{Xan}+?/utf
\x{6ca}\x{a6c}\x{10a7}_
@@ -1037,32 +1037,32 @@
/^\p{Xan}*/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
+
/^\p{Xan}{2,9}/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
+
/^\p{Xan}{2,9}?/utf
\x{6ca}\x{a6c}\x{10a7}_
-
+
/^[\p{Xan}]/utf
ABCD1234_
1234abcd_
\x{6ca}
\x{a6c}
- \x{10a7}
+ \x{10a7}
\= Expect no match
- _ABC
-
+ _ABC
+
/^[\p{Xan}]+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
\= Expect no match
- _ABC
+ _ABC
/^>\p{Xsp}/utf
>\x{1680}\x{2028}\x{0b}
- >\x{a0}
+ >\x{a0}
\= Expect no match
- \x{0b}
+ \x{0b}
/^>\p{Xsp}+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
@@ -1072,24 +1072,24 @@
/^>\p{Xsp}*/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xsp}{2,9}/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xsp}{2,9}?/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>[\p{Xsp}]/utf
>\x{2028}\x{0b}
-
+
/^>[\p{Xsp}]+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
/^>\p{Xps}/utf
>\x{1680}\x{2028}\x{0b}
- >\x{a0}
+ >\x{a0}
\= Expect no match
- \x{0b}
+ \x{0b}
/^>\p{Xps}+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
@@ -1099,16 +1099,16 @@
/^>\p{Xps}*/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xps}{2,9}/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xps}{2,9}?/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>[\p{Xps}]/utf
>\x{2028}\x{0b}
-
+
/^>[\p{Xps}]+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
@@ -1118,9 +1118,9 @@
\x{6ca}
\x{a6c}
\x{10a7}
- _ABC
+ _ABC
\= Expect no match
- []
+ []
/^\p{Xwd}+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
@@ -1130,33 +1130,33 @@
/^\p{Xwd}*/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
+
/^\p{Xwd}{2,9}/utf
A_B12\x{6ca}\x{a6c}\x{10a7}
-
+
/^\p{Xwd}{2,9}?/utf
\x{6ca}\x{a6c}\x{10a7}_
-
+
/^[\p{Xwd}]/utf
ABCD1234_
1234abcd_
\x{6ca}
\x{a6c}
- \x{10a7}
- _ABC
+ \x{10a7}
+ _ABC
\= Expect no match
- []
-
+ []
+
/^[\p{Xwd}]+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-# A check not in UTF-8 mode
+# A check not in UTF-8 mode
/^[\p{Xwd}]+/
ABCD1234_
-
-# Some negative checks
+# Some negative checks
+
/^[\P{Xwd}]+/utf
!.+\x{019}\x{35a}AB
@@ -1225,41 +1225,41 @@
/[[:xdigit:]]/B,ucp
-# Unicode properties for \b abd \B
+# Unicode properties for \b abd \B
/\b...\B/utf,ucp
abc_
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-# Without PCRE_UCP, non-ASCII always fail, even if < 256
+# Without PCRE_UCP, non-ASCII always fail, even if < 256
/\b...\B/utf
abc_
-\= Expect no match
- \x{37e}abc\x{376}
- \x{37e}\x{376}\x{371}\x{393}\x{394}
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
+\= Expect no match
+ \x{37e}abc\x{376}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
+# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
/\b...\B/ucp
abc_
- !\x{c0}++\x{c1}\x{c2}
- !\x{c0}+++++
+ !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}+++++
-# Some of these are silly, but they check various combinations
+# Some of these are silly, but they check various combinations
/[[:^alpha:][:^cntrl:]]+/B,utf,ucp
123
- abc
+ abc
/[[:^cntrl:][:^alpha:]]+/B,utf,ucp
123
- abc
+ abc
/[[:alpha:]]+/B,utf,ucp
abc
@@ -1266,12 +1266,12 @@
/[[:^alpha:]\S]+/B,utf,ucp
123
- abc
+ abc
/[^\d]+/B,utf,ucp
abc123
abc\x{123}
- \x{660}abc
+ \x{660}abc
/\p{Lu}+9\p{Lu}+B\p{Lu}+b/B
@@ -1291,7 +1291,7 @@
/A+\p{N}A+\dB+\p{N}*B+\d*/B,ucp
-# These behaved oddly in Perl, so they are kept in this test
+# These behaved oddly in Perl, so they are kept in this test
/(\x{23a}\x{23a}\x{23a})?\1/i,utf
\= Expect no match
@@ -1323,10 +1323,10 @@
/(\x{2c65}\x{2c65})\1/i,utf
\x{2c65}\x{2c65}\x{23a}\x{23a}
-
+
/(ⱥⱥ)\1/i,utf
- ⱥⱥȺȺ
-
+ ⱥⱥȺȺ
+
/(\x{23a}\x{23a}\x{23a})\1Y/i,utf
X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
@@ -1333,7 +1333,7 @@
/(\x{2c65}\x{2c65})\1Y/i,utf
X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
-# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
+# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
/^[\p{Batak}]/utf
\x{1bc0}
@@ -1340,19 +1340,19 @@
\x{1bff}
\= Expect no match
\x{1bf4}
-
+
/^[\p{Brahmi}]/utf
\x{11000}
\x{1106f}
\= Expect no match
\x{1104e}
-
+
/^[\p{Mandaic}]/utf
\x{840}
\x{85e}
\= Expect no match
\x{85c}
- \x{85d}
+ \x{85d}
/(\X*)(.)/s,utf
A\x{300}
@@ -1359,7 +1359,7 @@
/^S(\X*)e(\X*)$/utf
Stéréo
-
+
/^\X/utf
́réo
@@ -1391,9 +1391,9 @@
aa\=ps
aa\=ph
aba\=ps
-
-# These Unicode 6.1.0 scripts are not known to Perl.
+# These Unicode 6.1.0 scripts are not known to Perl.
+
/\p{Chakma}\d/utf,ucp
\x{11100}\x{1113c}
@@ -1407,7 +1407,7 @@
A\x{300}\x{301}\=ph
A\x{301}\=ps
A\x{301}\=ph
-
+
/^\X{2,3}/utf
A\=ps
A\=ph
@@ -1423,7 +1423,7 @@
AA\=ph
A\x{300}\x{301}A\x{300}\x{301}\=ps
A\x{300}\x{301}A\x{300}\x{301}\=ph
-
+
/^\X+/utf
AA\=ps
AA\=ph
@@ -1490,9 +1490,9 @@
/is{2}t/i,utf
\= Expect no match
iskt
-
-# This property is a PCRE special
+# This property is a PCRE special
+
/^\p{Xuc}/utf
$abc
@abc
@@ -1499,7 +1499,7 @@
`abc
\x{1234}abc
\= Expect no match
- abc
+ abc
/^\p{Xuc}+/utf
$@`\x{a0}\x{1234}\x{e000}**
@@ -1556,9 +1556,9 @@
@abc
`abc
\x{1234}abc
-
-# Some auto-possessification tests
+# Some auto-possessification tests
+
/\pN+\z/B
/\PN+\z/B
@@ -1607,7 +1607,7 @@
/\p{Xan}+\p{Nd} \P{Xan}+\p{Nd} \p{Xan}+\P{Nd} \P{Xan}+\P{Nd}/Bx,ucp
-# End auto-possessification tests
+# End auto-possessification tests
/\w+/B,utf,ucp,auto_callout
abcd
@@ -1627,7 +1627,7 @@
/\d+\s{0,5}=\s*\S?=\w{0,4}\W*/B,utf,ucp
/[RST]+/Bi,utf,ucp
-
+
/[R-T]+/Bi,utf,ucp
/[Q-U]+/Bi,utf,ucp
@@ -1640,7 +1640,7 @@
/\x{100}\x{200}\K\x{300}/utf,startchar
\x{100}\x{200}\x{300}
-
+
# Test UTF characters in a substitution
/ábc/utf,replace=XሴZ
@@ -1699,7 +1699,7 @@
/[^[:ascii:]\W]/utf,ucp,bincode
\x{de}
\x{200}
-\= Expect no match
+\= Expect no match
\x{300}
\x{37e}
@@ -1727,11 +1727,11 @@
\x{1d7cf}
\= Expect no match
\x{10000}
-
+
# Hex uses pattern length, not zero-terminated. This tests for overrunning
# the given length of a pattern.
-/'(*UTF)'/hex
+/'(*UTF)'/hex
/'#('/hex,extended,utf
@@ -1768,4 +1768,255 @@
//g,utf
\=zero_terminate
-# End of testinput5
+/^(?1)\p{Nd}{3}(a)/
+ a123a
+
+/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info
+
+# ---------------------------------------------------------------------------
+
+# A bunch of tests that hit lines of code that others do not (at least when
+# these were created).
+
+/^[^a]{3,}?x/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ bbb
+ cc
+
+/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ aaa\x{100}
+
+/^X\X/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{L&}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{L}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{Lu}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{Arabic}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\s+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ XX
+
+/^X\S+?/ucp,no_start_optimize,no_auto_possess
+ XX
+\= Expect no match
+ X
+
+/^X\w+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\R+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\H+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\V+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\s+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ XX
+
+/^X\S+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+
+/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess
+ XYYYZ
+\= Expect no match
+ XY
+ XYY
+ XYYY
+ XYYYYZ
+
+/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+
+/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+
+/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+
+/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+ XY\x{2f00}!
+
+/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+
+/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n
+ X\n!
+ X\n\n!
+
+/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XYY\n
+
+/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+ XYY!
+
+/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ X\x{b5}
+ X\x{b5}\x{b5}Y
+
+/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ X$
+ X@@Y
+
+/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect partial match
+ XYY\r\=ph
+\= Expect no match
+ X
+
+/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+ XYY
+
+/^X\R+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+ X\n\rX
+ X\n\r\nX
+ X\n\n
+ X\n\x{0c}
+
+/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+ X\n\rX
+ X\n\r\nX
+ X\n\n
+ X\n\x{0c}
+
+/^X\H+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\t
+ XYY
+
+/^X\h+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+ X\tY
+
+/^X\V+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+ XYY
+
+/^X\v+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+ X\nY
+
+/^X\D+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY9
+ XYY
+
+/^X\d+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X99
+ X9Y
+
+/^X\S+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+ XYY
+
+/^X\s+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+ X\nY
+
+/^X\W+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X.A
+ X++
+
+/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+ XY!
+
+/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+
+/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+
+/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XYY
+
+/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X$
+
+# ---------------------------------------------------------------------------
+
+# End of testinput5
Modified: code/trunk/testdata/testoutput1
===================================================================
--- code/trunk/testdata/testoutput1 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput1 2017-04-16 13:03:30 UTC (rev 751)
@@ -9487,4 +9487,9 @@
0: abc
1: a
+/^(?1)\d{3}(a)/
+ a123a
+ 0: a123a
+ 1: a
+
# End of testinput1
Modified: code/trunk/testdata/testoutput15
===================================================================
--- code/trunk/testdata/testoutput15 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput15 2017-04-16 13:03:30 UTC (rev 751)
@@ -400,4 +400,8 @@
0:
1:
+/(*LIMIT_HEAP=21)\[(a)]{60}/expand
+ \[a]{60}
+Failed: error -63: heap limit exceeded
+
# End of testinput15
Modified: code/trunk/testdata/testoutput2
===================================================================
--- code/trunk/testdata/testoutput2 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput2 2017-04-16 13:03:30 UTC (rev 751)
@@ -15607,6 +15607,272 @@
Last code unit = 'c'
Subject length lower bound = 4
+/(*LIMIT_HEAP=0)xxx/I
+Capturing subpattern count = 0
+Heap limit = 0
+First code unit = 'x'
+Last code unit = 'x'
+Subject length lower bound = 3
+
+/\d{0,3}(*:abc)(?C1)xxx/callout_info
+Callout 1 x
+
+# ----------------------------------------------------------------------
+
+# These are a whole pile of tests that touch lines of code that are not
+# used by any other tests (at least when these were created).
+
+/^a+?x/i,no_start_optimize,no_auto_possess
+\= Expect no match
+ aaa
+No match
+
+/^[^a]{3,}?x/i,no_start_optimize,no_auto_possess
+\= Expect no match
+ bbb
+No match
+ cc
+No match
+
+/^X\S/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\W/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\H/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\h/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\V/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\v/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\h/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+
+/^X\V/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n
+No match
+
+/^X\v/no_start_optimize,no_auto_possess
+\= Expect no match
+ XX
+No match
+
+/^X.+?/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\R+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ XX
+No match
+
+/^X\H+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\h+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\V+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ X\n
+No match
+
+/^X\D+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ X9
+No match
+
+/^X\S+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ X\n
+No match
+
+/^X\W+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ XX
+No match
+
+/^X.+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+
+/(*CRLF)^X.+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\r\=ps
+Partial match: XY\x0d
+
+/^X\R+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+No match
+ X\n\r\n
+No match
+ X\n\rY
+No match
+ X\n\nY
+No match
+ X\n\x{0c}Y
+No match
+
+/(*BSR_ANYCRLF)^X\R+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+No match
+ X\n\r\n
+No match
+ X\n\rY
+No match
+ X\n\nY
+No match
+ X\n\x{0c}Y
+No match
+
+/^X\H+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\t
+No match
+ XYY
+No match
+
+/^X\h+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+No match
+ X\tY
+No match
+
+/^X\V+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+ XYY
+No match
+
+/^X\v+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+No match
+ X\nY
+No match
+
+/^X\D+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY9
+No match
+ XYY
+No match
+
+/^X\d+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X99
+No match
+ X9Y
+No match
+
+/^X\S+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+ XYY
+No match
+
+/^X\s+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+No match
+ X\nY
+No match
+
+/^X\W+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X.A
+No match
+ X++
+No match
+
+/^X\w+?Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ Xa.
+No match
+ Xaa
+No match
+
+/^X.{1,3}Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ Xa.bd
+No match
+
+/^X\h+Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+No match
+ X\tY
+No match
+
+/^X\V+Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+ XYY
+No match
+
+/^(X(*THEN)Y|AB){0}(?1)/
+ ABX
+ 0: AB
+\= Expect no match
+ XAB
+No match
+
+/^(?!A(?C1)B)C/
+ ABC\=callout_error=1
+--->ABC
+ 1 ^^ B
+Failed: error -37: callout error code
+
+/^(?(?!A(?C1)B)C)/
+ ABC\=callout_error=1
+--->ABC
+ 1 ^^ B
+Failed: error -37: callout error code
+
+# ----------------------------------------------------------------------
+
# End of testinput2
Error -64: PCRE2_ERROR_BADDATA (unknown error number)
Error -62: bad serialized data
Modified: code/trunk/testdata/testoutput22-8
===================================================================
--- code/trunk/testdata/testoutput22-8 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput22-8 2017-04-16 13:03:30 UTC (rev 751)
@@ -169,4 +169,9 @@
a\x{100}b
No match
+/^ab\C/utf,no_start_optimize
+\= Expect no match - tests \C at end of subject
+ ab
+No match
+
# End of testinput22
Modified: code/trunk/testdata/testoutput4
===================================================================
--- code/trunk/testdata/testoutput4 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput4 2017-04-16 13:03:30 UTC (rev 751)
@@ -2716,6 +2716,13 @@
\x{1f88}\x{1f80}
0: \x{1f88}\x{1f80}
+# Check a reference with more than one other case
+
+/^(\x{00b5})\1{2}$/i,utf
+ \x{00b5}\x{039c}\x{03bc}
+ 0: \x{b5}\x{39c}\x{3bc}
+ 1: \x{b5}
+
# Characters with more than one other case; test in classes
/[z\x{00b5}]+/i,utf
@@ -3711,4 +3718,15 @@
11bb
0: b
+/^\x{123}+?$/utf,no_auto_possess
+ \x{123}\x{123}\x{123}
+ 0: \x{123}\x{123}\x{123}
+
+/^\x{123}+?$/i,utf,no_auto_possess
+ \x{123}\x{122}\x{123}
+ 0: \x{123}\x{122}\x{123}
+\= Expect no match
+ \x{123}\x{124}\x{123}
+No match
+
# End of testinput4
Modified: code/trunk/testdata/testoutput5
===================================================================
--- code/trunk/testdata/testoutput5 2017-04-14 12:55:45 UTC (rev 750)
+++ code/trunk/testdata/testoutput5 2017-04-16 13:03:30 UTC (rev 751)
@@ -16,7 +16,7 @@
\= Expect no match
\x{061c}
No match
-
+
/^[[:graph:]]+$/utf,ucp
\= Expect no match
\x{61c}
@@ -54,14 +54,14 @@
0: \x{09}\x{1d}\x{85}\x{61c}\x{2028}\x{2029}\x{2065}\x{2066}\x{2067}
\x{2068}\x{2069}
0: \x{2068}\x{2069}
-
+
# Perl does not consider U+180e to be a space character. It is true that it
# does not appear in the Unicode PropList.txt file as such, but in many other
# sources it is listed as a space, and has been treated as such in PCRE for
-# a long time.
+# a long time.
/^>[[:blank:]]*/utf,ucp
- >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
+ >\x{20}\x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{9}\x{b}\x{2028}
0: > \x{a0}\x{1680}\x{180e}\x{2000}\x{202f}\x{09}
/^A\s+Z/utf,ucp
@@ -73,7 +73,7 @@
0: A\x{2005}Z
A\x{85}\x{2005}Z
0: A\x{85}\x{2005}Z
-
+
/^[[:graph:]]+$/utf,ucp
\= Expect no match
\x{180e}
@@ -152,7 +152,7 @@
Subject length lower bound = 4
\x{0041}\x{2262}\x{0391}\x{002e}
0: A\x{2262}\x{391}.
-
+
/.{3,5}X/IB,utf
------------------------------------------------------------------
Bra
@@ -202,7 +202,7 @@
No match
\x{ff}
No match
- \x{100}
+ \x{100}
No match
/^[^ab]/IB,utf
@@ -221,32 +221,32 @@
0: c
\x{ff}
0: \x{ff}
- \x{100}
+ \x{100}
0: \x{100}
-\= Expect no match
+\= Expect no match
aaa
No match
-
+
/\x{100}*(\d+|"(?1)")/utf
1234
0: 1234
1: 1234
- "1234"
+ "1234"
0: "1234"
1: "1234"
\x{100}1234
0: \x{100}1234
1: 1234
- "\x{100}1234"
+ "\x{100}1234"
0: \x{100}1234
1: 1234
- \x{100}\x{100}12ab
+ \x{100}\x{100}12ab
0: \x{100}\x{100}12
1: 12
- \x{100}\x{100}"12"
+ \x{100}\x{100}"12"
0: \x{100}\x{100}"12"
1: "12"
-\= Expect no match
+\= Expect no match
\x{100}\x{100}abcd
No match
@@ -300,7 +300,7 @@
\= Expect no match
\x{105}
No match
- \x{ff}
+ \x{ff}
No match
/[\xFF]/IB
@@ -331,23 +331,23 @@
0: \x{d6}
\x{d6}
0: \x{d6}
-
+
/[Ä-Ü]/utf
Ö <-- Same with Study
0: \x{d6}
\x{d6}
0: \x{d6}
-
+
/[\x{c4}-\x{dc}]/utf
Ö # Matches without Study
0: \x{d6}
- \x{d6}
+ \x{d6}
0: \x{d6}
/[\x{c4}-\x{dc}]/utf
Ö <-- Same with Study
0: \x{d6}
- \x{d6}
+ \x{d6}
0: \x{d6}
/[^\x{100}]abc(xyz(?1))/IB,utf
@@ -472,11 +472,11 @@
/\W/utf
A.B
0: .
- A\x{100}B
+ A\x{100}B
0: \x{100}
-
+
/\w/utf
- \x{100}X
+ \x{100}X
0: X
/^\ሴ/IB,utf
@@ -497,7 +497,7 @@
()()()()()()()()()()
()()()()()()()()()()
A (x) (?41) B/x,utf
- AxxB
+ AxxB
Matched, but too many substrings
0: AxxB
1:
@@ -568,14 +568,14 @@
0: a\x{0b}b
a\x0cb
0: a\x{0c}b
- a\x{85}b
+ a\x{85}b
0: a\x{85}b
- a\x{2028}b
+ a\x{2028}b
0: a\x{2028}b
- a\x{2029}b
+ a\x{2029}b
0: a\x{2029}b
\= Expect no match
- a\n\rb
+ a\n\rb
No match
/^a\R*b/bsr=unicode,utf
@@ -591,11 +591,11 @@
0: a\x{0b}b
a\x0c\x{2028}\x{2029}b
0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
+ a\x{85}b
0: a\x{85}b
- a\n\rb
+ a\n\rb
0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
+ a\n\r\x{85}\x0cb
0: a\x{0a}\x{0d}\x{85}\x{0c}b
/^a\R+b/bsr=unicode,utf
@@ -609,14 +609,14 @@
0: a\x{0b}b
a\x0c\x{2028}\x{2029}b
0: a\x{0c}\x{2028}\x{2029}b
- a\x{85}b
+ a\x{85}b
0: a\x{85}b
- a\n\rb
+ a\n\rb
0: a\x{0a}\x{0d}b
- a\n\r\x{85}\x0cb
+ a\n\r\x{85}\x0cb
0: a\x{0a}\x{0d}\x{85}\x{0c}b
\= Expect no match
- ab
+ ab
No match
/^a\R{1,3}b/bsr=unicode,utf
@@ -626,13 +626,13 @@
0: a\x{0a}\x{0d}b
a\n\r\x{85}b
0: a\x{0a}\x{0d}\x{85}b
- a\r\n\r\nb
+ a\r\n\r\nb
0: a\x{0d}\x{0a}\x{0d}\x{0a}b
- a\r\n\r\n\r\nb
+ a\r\n\r\n\r\nb
0: a\x{0d}\x{0a}\x{0d}\x{0a}\x{0d}\x{0a}b
a\n\r\n\rb
0: a\x{0a}\x{0d}\x{0a}\x{0d}b
- a\n\n\r\nb
+ a\n\n\r\nb
0: a\x{0a}\x{0a}\x{0d}\x{0a}b
\= Expect no match
a\n\n\n\rb
@@ -646,9 +646,9 @@
X\x09X\x0b
0: X\x{09}X\x{0b}
\= Expect no match
- \x{a0} X\x0a
+ \x{a0} X\x0a
No match
-
+
/\H*\h+\V?\v{3,4}/utf
\x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
0: \x{09} \x{a0}X\x{0a}\x{0b}\x{0c}\x{0d}
@@ -656,10 +656,10 @@
0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}\x{0d}
\x09\x20\x{a0}\x0a\x0b\x0c
0: \x{09} \x{a0}\x{0a}\x{0b}\x{0c}
-\= Expect no match
+\= Expect no match
\x09\x20\x{a0}\x0a\x0b
No match
-
+
/\H\h\V\v/utf
\x{3001}\x{3000}\x{2030}\x{2028}
0: \x{3001}\x{3000}\x{2030}\x{2028}
@@ -666,9 +666,9 @@
X\x{180e}X\x{85}
0: X\x{180e}X\x{85}
\= Expect no match
- \x{2009} X\x0a
+ \x{2009} X\x0a
No match
-
+
/\H*\h+\V?\v{3,4}/utf
\x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
0: \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x{0c}\x{0d}
@@ -676,10 +676,10 @@
0: \x{09}\x{205f}\x{a0}\x{0a}\x{2029}\x{0c}\x{2028}
\x09\x20\x{202f}\x0a\x0b\x0c
0: \x{09} \x{202f}\x{0a}\x{0b}\x{0c}
-\= Expect no match
+\= Expect no match
\x09\x{200a}\x{a0}\x{2028}\x0b
No match
-
+
/[\h]/B,utf
------------------------------------------------------------------
Bra
@@ -725,9 +725,9 @@
------------------------------------------------------------------
/.*$/newline=any,utf
- \x{1ec5}
+ \x{1ec5}
0: \x{1ec5}
-
+
/a\Rb/I,bsr=anycrlf,utf
Capturing subpattern count = 0
Options: utf
@@ -744,7 +744,7 @@
\= Expect no match
a\x{85}b
No match
- a\x0bb
+ a\x0bb
No match
/a\Rb/I,bsr=unicode,utf
@@ -762,9 +762,9 @@
0: a\x{0d}\x{0a}b
a\x{85}b
0: a\x{85}b
- a\x0bb
+ a\x0bb
0: a\x{0b}b
-
+
/a\R?b/I,bsr=anycrlf,utf
Capturing subpattern count = 0
Options: utf
@@ -781,7 +781,7 @@
\= Expect no match
a\x{85}b
No match
- a\x0bb
+ a\x0bb
No match
/a\R?b/I,bsr=unicode,utf
@@ -799,9 +799,9 @@
0: a\x{0d}\x{0a}b
a\x{85}b
0: a\x{85}b
- a\x0bb
+ a\x0bb
0: a\x{0b}b
-
+
/.*a.*=.b.*/utf,newline=any
QQQ\x{2029}ABCaXYZ=!bPQR
0: ABCaXYZ=!bPQR
@@ -808,7 +808,7 @@
\= Expect no match
a\x{2029}b
No match
- \x61\xe2\x80\xa9\x62
+ \x61\xe2\x80\xa9\x62
No match
/[[:a\x{100}b:]]/utf
@@ -817,19 +817,19 @@
/a[^]b/utf,alt_bsux,allow_empty_class,match_unset_backref
a\x{1234}b
0: a\x{1234}b
- a\nb
+ a\nb
0: a\x{0a}b
\= Expect no match
- ab
+ ab
No match
-
+
/a[^]+b/utf,alt_bsux,allow_empty_class,match_unset_backref
aXb
0: aXb
- a\nX\nX\x{1234}b
+ a\nX\nX\x{1234}b
0: a\x{0a}X\x{0a}X\x{1234}b
\= Expect no match
- ab
+ ab
No match
/(\x{de})\1/
@@ -852,7 +852,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/Xa{2,4}?b/utf
X\=ps
Partial match: X
@@ -864,7 +864,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/Xa{2,4}+b/utf
X\=ps
Partial match: X
@@ -876,7 +876,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/X\x{123}{2,4}b/utf
X\=ps
Partial match: X
@@ -888,7 +888,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X\x{123}{2,4}?b/utf
X\=ps
Partial match: X
@@ -900,7 +900,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X\x{123}{2,4}+b/utf
X\=ps
Partial match: X
@@ -912,7 +912,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X\x{123}{2,4}b/utf
\= Expect no match
Xx\=ps
@@ -925,7 +925,7 @@
No match
X\x{123}\x{123}\x{123}\x{123}x\=ps
No match
-
+
/X\x{123}{2,4}?b/utf
\= Expect no match
Xx\=ps
@@ -938,7 +938,7 @@
No match
X\x{123}\x{123}\x{123}\x{123}x\=ps
No match
-
+
/X\x{123}{2,4}+b/utf
\= Expect no match
Xx\=ps
@@ -951,7 +951,7 @@
No match
X\x{123}\x{123}\x{123}\x{123}x\=ps
No match
-
+
/X\d{2,4}b/utf
X\=ps
Partial match: X
@@ -963,7 +963,7 @@
Partial match: X333
X3333\=ps
Partial match: X3333
-
+
/X\d{2,4}?b/utf
X\=ps
Partial match: X
@@ -975,7 +975,7 @@
Partial match: X333
X3333\=ps
Partial match: X3333
-
+
/X\d{2,4}+b/utf
X\=ps
Partial match: X
@@ -999,7 +999,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/X\D{2,4}?b/utf
X\=ps
Partial match: X
@@ -1011,7 +1011,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/X\D{2,4}+b/utf
X\=ps
Partial match: X
@@ -1035,7 +1035,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X\D{2,4}?b/utf
X\=ps
Partial match: X
@@ -1047,7 +1047,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X\D{2,4}+b/utf
X\=ps
Partial match: X
@@ -1071,7 +1071,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/X[abc]{2,4}?b/utf
X\=ps
Partial match: X
@@ -1083,7 +1083,7 @@
Partial match: Xaaa
Xaaaa\=ps
Partial match: Xaaaa
-
+
/X[abc]{2,4}+b/utf
X\=ps
Partial match: X
@@ -1107,7 +1107,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X[abc\x{123}]{2,4}?b/utf
X\=ps
Partial match: X
@@ -1119,7 +1119,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X[abc\x{123}]{2,4}+b/utf
X\=ps
Partial match: X
@@ -1143,7 +1143,7 @@
Partial match: Xzzz
Xzzzz\=ps
Partial match: Xzzzz
-
+
/X[^a]{2,4}?b/utf
X\=ps
Partial match: X
@@ -1155,7 +1155,7 @@
Partial match: Xzzz
Xzzzz\=ps
Partial match: Xzzzz
-
+
/X[^a]{2,4}+b/utf
X\=ps
Partial match: X
@@ -1179,7 +1179,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X[^a]{2,4}?b/utf
X\=ps
Partial match: X
@@ -1191,7 +1191,7 @@
Partial match: X\x{123}\x{123}\x{123}
X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: X\x{123}\x{123}\x{123}\x{123}
-
+
/X[^a]{2,4}+b/utf
X\=ps
Partial match: X
@@ -1215,7 +1215,7 @@
Partial match: YXYYY
YXYYYY\=ps
Partial match: YXYYYY
-
+
/(Y)X\1{2,4}?b/utf
YX\=ps
Partial match: YX
@@ -1227,7 +1227,7 @@
Partial match: YXYYY
YXYYYY\=ps
Partial match: YXYYYY
-
+
/(Y)X\1{2,4}+b/utf
YX\=ps
Partial match: YX
@@ -1251,7 +1251,7 @@
Partial match: \x{123}X\x{123}\x{123}\x{123}
\x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
-
+
/(\x{123})X\1{2,4}?b/utf
\x{123}X\=ps
Partial match: \x{123}X
@@ -1263,7 +1263,7 @@
Partial match: \x{123}X\x{123}\x{123}\x{123}
\x{123}X\x{123}\x{123}\x{123}\x{123}\=ps
Partial match: \x{123}X\x{123}\x{123}\x{123}\x{123}
-
+
/(\x{123})X\1{2,4}+b/utf
\x{123}X\=ps
Partial match: \x{123}X
@@ -1328,7 +1328,7 @@
0: \x{a0}xxx\x{85}
/\S \S/utf,tables=2
- \x{a2} \x{84}
+ \x{a2} \x{84}
0: \x{a2} \x{84}
'A#хц'Bx,newline=any,utf
@@ -1347,7 +1347,7 @@
Ket
End
------------------------------------------------------------------
-
+
/a+#хaa
z#XX?/Bx,newline=any,utf
------------------------------------------------------------------
@@ -1402,11 +1402,11 @@
0: \x{0d}
1:
2: \x{0d}
- \r\r\n\n\r
+ \r\r\n\n\r
0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1: \x{0d}\x{0d}\x{0a}\x{0a}
2: \x{0d}
- \r\r\n\n\r\n
+ \r\r\n\n\r\n
0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1: \x{0d}\x{0d}\x{0a}\x{0a}
2: \x{0d}
@@ -1416,11 +1416,11 @@
0: \x{0d}
1: <unset>
2: \x{0d}
- \r\r\n\n\r
+ \r\r\n\n\r
0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1: \x{0a}
2: \x{0d}
- \r\r\n\n\r\n
+ \r\r\n\n\r\n
0: \x{0d}\x{0d}\x{0a}\x{0a}\x{0d}
1: \x{0a}
2: \x{0d}
@@ -1460,7 +1460,7 @@
/f.*/s,utf
for\=ph
Partial match: for
-
+
/\x{d7ff}\x{e000}/utf
/\x{d800}/utf
@@ -1635,7 +1635,7 @@
0: \x{0d}
\r\=ph
Partial match: \x{0d}
-
+
/.{2,3}/utf,newline=crlf
\r\=ps
Partial match: \x{0d}
@@ -1857,10 +1857,10 @@
0: 1234
12-34
0: 12-34
- 12+\x{661}-34
+ 12+\x{661}-34
0: 12+\x{661}-34
\= Expect no match
- abcd
+ abcd
No match
/(?:[\PPa*]*){8,}/
@@ -1929,7 +1929,7 @@
0: \x{2028}\x{2028}
\x{2028}\x{2028}\x{2028}
0: \x{2028}\x{2028}\x{2028}
-
+
/\p{Zl}/B,utf
------------------------------------------------------------------
Bra
@@ -1980,9 +1980,9 @@
\x{dfff}\=no_utf_check
0: \x{dfff}
\= Expect no match
- \x{09f}
+ \x{09f}
No match
-
+
/^\p{Mn}/utf
\x{1a1b}
0: \x{1a1b}
@@ -2009,7 +2009,7 @@
No match
\x{2c2}
No match
-
+
/^\p{Zs}/utf
\ \
0:
@@ -2019,22 +2019,22 @@
0: \x{1680}
\x{2000}
0: \x{2000}
- \x{2001}
+ \x{2001}
0: \x{2001}
\= Expect no match
\x{2028}
No match
- \x{200d}
+ \x{200d}
No match
-
+
# These are here because Perl has problems with the negative versions of the
# properties and has changed how it behaves for caseless matching.
-
+
/\p{^Lu}/i,utf
1234
0: 1
\= Expect no match
- ABC
+ ABC
No match
/\P{Lu}/i,utf
@@ -2041,7 +2041,7 @@
1234
0: 1
\= Expect no match
- ABC
+ ABC
No match
/\p{Ll}/i,utf
@@ -2050,18 +2050,18 @@
Az
0: z
\= Expect no match
- ABC
+ ABC
No match
/\p{Lu}/i,utf
A
0: A
- a\x{10a0}B
+ a\x{10a0}B
0: \x{10a0}
-\= Expect no match
+\= Expect no match
a
No match
- \x{1d00}
+ \x{1d00}
No match
/\p{Lu}/i,utf
@@ -2070,24 +2070,24 @@
aZ
0: Z
\= Expect no match
- abc
+ abc
No match
/[\x{c0}\x{391}]/i,utf
\x{c0}
0: \x{c0}
- \x{e0}
+ \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
-# second was broken in all cases.
+# second was broken in all cases.
/^\x{023a}+?(\x{0130}+)/i,utf
\x{023a}\x{2c65}\x{0130}
0: \x{23a}\x{2c65}\x{130}
1: \x{130}
-
+
/^\x{023a}+([^X])/i,utf
\x{023a}\x{2c65}X
0: \x{23a}\x{2c65}
@@ -2118,24 +2118,24 @@
/^\x{c0}$/i,utf
\x{c0}
0: \x{c0}
- \x{e0}
+ \x{e0}
0: \x{e0}
/^\x{e0}$/i,utf
\x{c0}
0: \x{c0}
- \x{e0}
+ \x{e0}
0: \x{e0}
# 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}])/utf
\x{c0}
0: \x{c0}
1: \x{c0}
- \x{e0}
+ \x{e0}
0: \x{e0}
1: \x{e0}
@@ -2142,10 +2142,10 @@
/(?i:[\x{c0}])/utf
\x{c0}
0: \x{c0}
- \x{e0}
+ \x{e0}
0: \x{e0}
-# These are PCRE's extra properties to help with Unicodizing \d etc.
+# These are PCRE's extra properties to help with Unicodizing \d etc.
/^\p{Xan}/utf
ABCD
@@ -2156,10 +2156,10 @@
0: \x{6ca}
\x{a6c}
0: \x{a6c}
- \x{10a7}
+ \x{10a7}
0: \x{10a7}
\= Expect no match
- _ABC
+ _ABC
No match
/^\p{Xan}+/utf
@@ -2166,7 +2166,7 @@
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
\= Expect no match
- _ABC
+ _ABC
No match
/^\p{Xan}+?/utf
@@ -2176,15 +2176,15 @@
/^\p{Xan}*/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
-
+
/^\p{Xan}{2,9}/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}
-
+
/^\p{Xan}{2,9}?/utf
\x{6ca}\x{a6c}\x{10a7}_
0: \x{6ca}\x{a6c}
-
+
/^[\p{Xan}]/utf
ABCD1234_
0: A
@@ -2194,26 +2194,26 @@
0: \x{6ca}
\x{a6c}
0: \x{a6c}
- \x{10a7}
+ \x{10a7}
0: \x{10a7}
\= Expect no match
- _ABC
+ _ABC
No match
-
+
/^[\p{Xan}]+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}\x{a6c}\x{10a7}
\= Expect no match
- _ABC
+ _ABC
No match
/^>\p{Xsp}/utf
>\x{1680}\x{2028}\x{0b}
0: >\x{1680}
- >\x{a0}
+ >\x{a0}
0: >\x{a0}
\= Expect no match
- \x{0b}
+ \x{0b}
No match
/^>\p{Xsp}+/utf
@@ -2227,19 +2227,19 @@
/^>\p{Xsp}*/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xsp}{2,9}/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xsp}{2,9}?/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}
-
+
/^>[\p{Xsp}]/utf
>\x{2028}\x{0b}
0: >\x{2028}
-
+
/^>[\p{Xsp}]+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
@@ -2247,10 +2247,10 @@
/^>\p{Xps}/utf
>\x{1680}\x{2028}\x{0b}
0: >\x{1680}
- >\x{a0}
+ >\x{a0}
0: >\x{a0}
\= Expect no match
- \x{0b}
+ \x{0b}
No match
/^>\p{Xps}+/utf
@@ -2264,19 +2264,19 @@
/^>\p{Xps}*/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xps}{2,9}/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
-
+
/^>\p{Xps}{2,9}?/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}
-
+
/^>[\p{Xps}]/utf
>\x{2028}\x{0b}
0: >\x{2028}
-
+
/^>[\p{Xps}]+/utf
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
0: > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
@@ -2292,10 +2292,10 @@
0: \x{a6c}
\x{10a7}
0: \x{10a7}
- _ABC
+ _ABC
0: _
\= Expect no match
- []
+ []
No match
/^\p{Xwd}+/utf
@@ -2309,15 +2309,15 @@
/^\p{Xwd}*/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-
+
/^\p{Xwd}{2,9}/utf
A_B12\x{6ca}\x{a6c}\x{10a7}
0: A_B12\x{6ca}\x{a6c}\x{10a7}
-
+
/^\p{Xwd}{2,9}?/utf
\x{6ca}\x{a6c}\x{10a7}_
0: \x{6ca}\x{a6c}
-
+
/^[\p{Xwd}]/utf
ABCD1234_
0: A
@@ -2327,26 +2327,26 @@
0: \x{6ca}
\x{a6c}
0: \x{a6c}
- \x{10a7}
+ \x{10a7}
0: \x{10a7}
- _ABC
+ _ABC
0: _
\= Expect no match
- []
+ []
No match
-
+
/^[\p{Xwd}]+/utf
ABCD1234\x{6ca}\x{a6c}\x{10a7}_
0: ABCD1234\x{6ca}\x{a6c}\x{10a7}_
-# A check not in UTF-8 mode
+# A check not in UTF-8 mode
/^[\p{Xwd}]+/
ABCD1234_
0: ABCD1234_
-
-# Some negative checks
+# Some negative checks
+
/^[\P{Xwd}]+/utf
!.+\x{019}\x{35a}AB
0: !.+\x{19}\x{35a}
@@ -2579,46 +2579,46 @@
End
------------------------------------------------------------------
-# Unicode properties for \b abd \B
+# Unicode properties for \b abd \B
/\b...\B/utf,ucp
abc_
0: abc
- \x{37e}abc\x{376}
+ \x{37e}abc\x{376}
0: abc
- \x{37e}\x{376}\x{371}\x{393}\x{394}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
0: \x{376}\x{371}\x{393}
- !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}++\x{c1}\x{c2}
0: ++\x{c1}
- !\x{c0}+++++
+ !\x{c0}+++++
0: \x{c0}++
-# Without PCRE_UCP, non-ASCII always fail, even if < 256
+# Without PCRE_UCP, non-ASCII always fail, even if < 256
/\b...\B/utf
abc_
0: abc
-\= Expect no match
- \x{37e}abc\x{376}
+\= Expect no match
+ \x{37e}abc\x{376}
No match
- \x{37e}\x{376}\x{371}\x{393}\x{394}
+ \x{37e}\x{376}\x{371}\x{393}\x{394}
No match
- !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}++\x{c1}\x{c2}
No match
- !\x{c0}+++++
+ !\x{c0}+++++
No match
-# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
+# With PCRE_UCP, non-UTF8 chars that are < 256 still check properties
/\b...\B/ucp
abc_
0: abc
- !\x{c0}++\x{c1}\x{c2}
+ !\x{c0}++\x{c1}\x{c2}
0: ++\xc1
- !\x{c0}+++++
+ !\x{c0}+++++
0: \xc0++
-# Some of these are silly, but they check various combinations
+# Some of these are silly, but they check various combinations
/[[:^alpha:][:^cntrl:]]+/B,utf,ucp
------------------------------------------------------------------
@@ -2629,7 +2629,7 @@
------------------------------------------------------------------
123
0: 123
- abc
+ abc
0: abc
/[[:^cntrl:][:^alpha:]]+/B,utf,ucp
@@ -2641,7 +2641,7 @@
------------------------------------------------------------------
123
0: 123
- abc
+ abc
0: abc
/[[:alpha:]]+/B,utf,ucp
@@ -2663,7 +2663,7 @@
------------------------------------------------------------------
123
0: 123
- abc
+ abc
0: abc
/[^\d]+/B,utf,ucp
@@ -2677,7 +2677,7 @@
0: abc
abc\x{123}
0: abc\x{123}
- \x{660}abc
+ \x{660}abc
0: abc
/\p{Lu}+9\p{Lu}+B\p{Lu}+b/B
@@ -2789,7 +2789,7 @@
End
------------------------------------------------------------------
-# These behaved oddly in Perl, so they are kept in this test
+# These behaved oddly in Perl, so they are kept in this test
/(\x{23a}\x{23a}\x{23a})?\1/i,utf
\= Expect no match
@@ -2835,12 +2835,12 @@
\x{2c65}\x{2c65}\x{23a}\x{23a}
0: \x{2c65}\x{2c65}\x{23a}\x{23a}
1: \x{2c65}\x{2c65}
-
+
/(ⱥⱥ)\1/i,utf
- ⱥⱥȺȺ
+ ⱥⱥȺȺ
0: \x{2c65}\x{2c65}\x{23a}\x{23a}
1: \x{2c65}\x{2c65}
-
+
/(\x{23a}\x{23a}\x{23a})\1Y/i,utf
X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
0: \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}Y
@@ -2851,7 +2851,7 @@
0: \x{2c65}\x{2c65}\x{23a}\x{23a}Y
1: \x{2c65}\x{2c65}
-# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
+# These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE
/^[\p{Batak}]/utf
\x{1bc0}
@@ -2861,7 +2861,7 @@
\= Expect no match
\x{1bf4}
No match
-
+
/^[\p{Brahmi}]/utf
\x{11000}
0: \x{11000}
@@ -2870,7 +2870,7 @@
\= Expect no match
\x{1104e}
No match
-
+
/^[\p{Mandaic}]/utf
\x{840}
0: \x{840}
@@ -2879,7 +2879,7 @@
\= Expect no match
\x{85c}
No match
- \x{85d}
+ \x{85d}
No match
/(\X*)(.)/s,utf
@@ -2893,7 +2893,7 @@
0: Ste\x{301}re\x{301}o
1: te\x{301}r
2: \x{301}o
-
+
/^\X/utf
́réo
0: \x{301}
@@ -2942,9 +2942,9 @@
0: aa
aba\=ps
0: aba
-
-# These Unicode 6.1.0 scripts are not known to Perl.
+# These Unicode 6.1.0 scripts are not known to Perl.
+
/\p{Chakma}\d/utf,ucp
\x{11100}\x{1113c}
0: \x{11100}\x{1113c}
@@ -2966,7 +2966,7 @@
0: A\x{301}
A\x{301}\=ph
Partial match: A\x{301}
-
+
/^\X{2,3}/utf
A\=ps
Partial match: A
@@ -2994,7 +2994,7 @@
0: A\x{300}\x{301}A\x{300}\x{301}
A\x{300}\x{301}A\x{300}\x{301}\=ph
Partial match: A\x{300}\x{301}A\x{300}\x{301}
-
+
/^\X+/utf
AA\=ps
0: AA
@@ -3167,9 +3167,9 @@
\= Expect no match
iskt
No match
-
-# This property is a PCRE special
+# This property is a PCRE special
+
/^\p{Xuc}/utf
$abc
0: $
@@ -3180,7 +3180,7 @@
\x{1234}abc
0: \x{1234}
\= Expect no match
- abc
+ abc
No match
/^\p{Xuc}+/utf
@@ -3264,9 +3264,9 @@
No match
\x{1234}abc
No match
-
-# Some auto-possessification tests
+# Some auto-possessification tests
+
/\pN+\z/B
------------------------------------------------------------------
Bra
@@ -3767,7 +3767,7 @@
End
------------------------------------------------------------------
-# End auto-possessification tests
+# End auto-possessification tests
/\w+/B,utf,ucp,auto_callout
------------------------------------------------------------------
@@ -3914,7 +3914,7 @@
Ket
End
------------------------------------------------------------------
-
+
/[R-T]+/Bi,utf,ucp
------------------------------------------------------------------
Bra
@@ -3948,7 +3948,7 @@
\x{100}\x{200}\x{300}
0: \x{100}\x{200}\x{300}
^^^^^^^^^^^^^^
-
+
# Test UTF characters in a substitution
/ábc/utf,replace=XሴZ
@@ -4103,7 +4103,7 @@
0: \x{de}
\x{200}
0: \x{200}
-\= Expect no match
+\= Expect no match
\x{300}
No match
\x{37e}
@@ -4163,11 +4163,11 @@
\= Expect no match
\x{10000}
No match
-
+
# Hex uses pattern length, not zero-terminated. This tests for overrunning
# the given length of a pattern.
-/'(*UTF)'/hex
+/'(*UTF)'/hex
/'#('/hex,extended,utf
@@ -4238,4 +4238,349 @@
\=zero_terminate
0:
-# End of testinput5
+/^(?1)\p{Nd}{3}(a)/
+ a123a
+ 0: a123a
+ 1: a
+
+/\p{Nd}{0,3}[\pL](*:abc)(?C1)xxx/callout_info
+Callout 1 x
+
+# ---------------------------------------------------------------------------
+
+# A bunch of tests that hit lines of code that others do not (at least when
+# these were created).
+
+/^[^a]{3,}?x/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ bbb
+No match
+ cc
+No match
+
+/^[ac]{3,}?x/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ aaa\x{100}
+No match
+
+/^X\X/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{L&}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{L}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{Lu}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{Arabic}+?/no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{Xan}+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\s+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ XX
+No match
+
+/^X\S+?/ucp,no_start_optimize,no_auto_possess
+ XX
+ 0: XX
+\= Expect no match
+ X
+No match
+
+/^X\w+?/ucp,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X[^\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X[\x{b5}]+?/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{Xuc}+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\R+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\H+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\V+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\s+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ XX
+No match
+
+/^X\S+?/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+
+/^X\p{Any}{1,3}?Z/s,no_start_optimize,no_auto_possess
+ XYYYZ
+ 0: XYYYZ
+\= Expect no match
+ XY
+No match
+ XYY
+No match
+ XYYY
+No match
+ XYYYYZ
+No match
+
+/^X\p{L&}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+
+/^X\p{L}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+
+/^X\p{Lu}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+
+/^X\P{Han}{1,3}?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+ XY\x{2f00}!
+No match
+
+/^X\p{Xan}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+
+/^X\p{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n
+No match
+ X\n!
+No match
+ X\n\n!
+No match
+
+/^X\P{Xsp}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XYY\n
+No match
+
+/^X\p{Xwd}{1,3}?Z/s,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+ XYY!
+No match
+
+/^X\x{b5}+?Z/i,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ X\x{b5}
+No match
+ X\x{b5}\x{b5}Y
+No match
+
+/^X\p{Xuc}+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ X$
+No match
+ X@@Y
+No match
+
+/(*CRLF)^X.+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect partial match
+ XYY\r\=ph
+Partial match: XYY\x{0d}
+\= Expect no match
+ X
+No match
+
+/^X.+?Z/s,utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X
+No match
+ XYY
+No match
+
+/^X\R+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+No match
+ X\n\rX
+No match
+ X\n\r\nX
+No match
+ X\n\n
+No match
+ X\n\x{0c}
+No match
+
+/(*BSR_ANYCRLF)^X\R+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\nX
+No match
+ X\n\rX
+No match
+ X\n\r\nX
+No match
+ X\n\n
+No match
+ X\n\x{0c}
+No match
+
+/^X\H+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\t
+No match
+ XYY
+No match
+
+/^X\h+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\t\t
+No match
+ X\tY
+No match
+
+/^X\V+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+ XYY
+No match
+
+/^X\v+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+No match
+ X\nY
+No match
+
+/^X\D+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY9
+No match
+ XYY
+No match
+
+/^X\d+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X99
+No match
+ X9Y
+No match
+
+/^X\S+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ XY\n
+No match
+ XYY
+No match
+
+/^X\s+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X\n\n
+No match
+ X\nY
+No match
+
+/^X\W+?Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X.A
+No match
+ X++
+No match
+
+/^X\p{L&}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+ XY!
+No match
+
+/^X\p{L}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+
+/^X\p{Xan}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XY
+No match
+
+/^X\P{Xsp}{1,3}Z/no_start_optimize,no_auto_possess
+\= Expect no match
+ XYY
+No match
+
+/^X\p{Xuc}+Z/utf,no_start_optimize,no_auto_possess
+\= Expect no match
+ X$
+No match
+
+# ---------------------------------------------------------------------------
+
+# End of testinput5