105 lines
2.8 KiB
Diff
105 lines
2.8 KiB
Diff
From fc56fd790c1a3ba8f2890fc2b6afba21250923de Mon Sep 17 00:00:00 2001
|
|
From: Philip Hazel <Philip.Hazel@gmail.com>
|
|
Date: Thu, 2 Feb 2023 17:19:45 +0000
|
|
Subject: [PATCH] Further ASCII tests and minor bugfix plus ChangeLog update
|
|
|
|
Conflict:don't modify ChangeLog
|
|
Reference:https://github.com/PCRE2Project/pcre2/commit/fc56fd790c1a3ba8f2890fc2b6afba21250923de
|
|
|
|
---
|
|
src/pcre2_compile.c | 5 ++---
|
|
testdata/testinput5 | 5 +++++
|
|
testdata/testinput7 | 5 +++++
|
|
testdata/testoutput5 | 7 +++++++
|
|
testdata/testoutput7 | 7 +++++++
|
|
5 files changed, 26 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/src/pcre2_compile.c b/src/pcre2_compile.c
|
|
index b8a9e098..64a35bda 100644
|
|
--- a/src/pcre2_compile.c
|
|
+++ b/src/pcre2_compile.c
|
|
@@ -2660,10 +2660,9 @@ the main compiling phase. */
|
|
PCRE2_EXTENDED|PCRE2_EXTENDED_MORE|PCRE2_MULTILINE|PCRE2_NO_AUTO_CAPTURE| \
|
|
PCRE2_UNGREEDY)
|
|
|
|
-#define PARSE_TRACKED_EXTRA_OPTIONS (PCRE2_EXTRA_CASELESS_RESTRICT)
|
|
-
|
|
#define PARSE_TRACKED_EXTRA_OPTIONS (PCRE2_EXTRA_CASELESS_RESTRICT| \
|
|
- PCRE2_EXTRA_ASCII_BSD|PCRE2_EXTRA_ASCII_BSS|PCRE2_EXTRA_ASCII_BSW)
|
|
+ PCRE2_EXTRA_ASCII_BSD|PCRE2_EXTRA_ASCII_BSS|PCRE2_EXTRA_ASCII_BSW| \
|
|
+ PCRE2_EXTRA_ASCII_POSIX)
|
|
|
|
/* States used for analyzing ranges in character classes. The two OK values
|
|
must be last. */
|
|
diff --git a/testdata/testinput5 b/testdata/testinput5
|
|
index 6e186cf0..49b46f82 100644
|
|
--- a/testdata/testinput5
|
|
+++ b/testdata/testinput5
|
|
@@ -2434,6 +2434,11 @@
|
|
/(?aP)[[:alnum:]\d]+/i,ucp,utf
|
|
abc\x{660}xyz
|
|
|
|
+/(*UCP)(*UTF)[[:alnum:]](?aP:[[:alnum:]])[[:alnum:]]/
|
|
+ \x{660}A\x{660}
|
|
+\= Expect no match
|
|
+ \x{660}\x{660}\x{660}
|
|
+
|
|
# VARIOUS
|
|
|
|
/[\d\s\w]+/a,ucp,utf
|
|
diff --git a/testdata/testinput7 b/testdata/testinput7
|
|
index 64a37ad2..a2b7fb8d 100644
|
|
--- a/testdata/testinput7
|
|
+++ b/testdata/testinput7
|
|
@@ -2453,6 +2453,11 @@
|
|
/(?aP)[[:alnum:]\d]+/i,ucp,utf
|
|
abc\x{660}xyz
|
|
|
|
+/(*UCP)(*UTF)[[:alnum:]](?aP:[[:alnum:]])[[:alnum:]]/
|
|
+ \x{660}A\x{660}
|
|
+\= Expect no match
|
|
+ \x{660}\x{660}\x{660}
|
|
+
|
|
# VARIOUS
|
|
|
|
/[\d\s\w]+/a,ucp,utf
|
|
diff --git a/testdata/testoutput5 b/testdata/testoutput5
|
|
index 26972f70..4f845c84 100644
|
|
--- a/testdata/testoutput5
|
|
+++ b/testdata/testoutput5
|
|
@@ -5365,6 +5365,13 @@ No match
|
|
abc\x{660}xyz
|
|
0: abc\x{660}xyz
|
|
|
|
+/(*UCP)(*UTF)[[:alnum:]](?aP:[[:alnum:]])[[:alnum:]]/
|
|
+ \x{660}A\x{660}
|
|
+ 0: \x{660}A\x{660}
|
|
+\= Expect no match
|
|
+ \x{660}\x{660}\x{660}
|
|
+No match
|
|
+
|
|
# VARIOUS
|
|
|
|
/[\d\s\w]+/a,ucp,utf
|
|
diff --git a/testdata/testoutput7 b/testdata/testoutput7
|
|
index c830748c..4065981d 100644
|
|
--- a/testdata/testoutput7
|
|
+++ b/testdata/testoutput7
|
|
@@ -4105,6 +4105,13 @@ No match
|
|
abc\x{660}xyz
|
|
0: abc\x{660}xyz
|
|
|
|
+/(*UCP)(*UTF)[[:alnum:]](?aP:[[:alnum:]])[[:alnum:]]/
|
|
+ \x{660}A\x{660}
|
|
+ 0: \x{660}A\x{660}
|
|
+\= Expect no match
|
|
+ \x{660}\x{660}\x{660}
|
|
+No match
|
|
+
|
|
# VARIOUS
|
|
|
|
/[\d\s\w]+/a,ucp,utf
|
|
--
|
|
2.33.0
|
|
|