summaryrefslogtreecommitdiff
path: root/pcre_jit_test.c
diff options
context:
space:
mode:
authorzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2014-01-01 15:15:09 +0000
committerzherczeg <zherczeg@2f5784b3-3f2a-0410-8824-cb99058d5e15>2014-01-01 15:15:09 +0000
commita1c55266d6de9114eff7a3266c2e18a6182425d8 (patch)
tree9b8f8d11abe6254b677b5051f696afa8f2162bd7 /pcre_jit_test.c
parentdd23c5d552a226ebd4b1a82df883dbf569731906 (diff)
downloadpcre-a1c55266d6de9114eff7a3266c2e18a6182425d8.tar.gz
JIT: Optimize character range read based on minimum value in UTF-8 mode. Several tests were added for checking existing character range optimizations.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1427 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_jit_test.c')
-rw-r--r--pcre_jit_test.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pcre_jit_test.c b/pcre_jit_test.c
index 0fec0ee..4ec6f9d 100644
--- a/pcre_jit_test.c
+++ b/pcre_jit_test.c
@@ -75,9 +75,14 @@ POSSIBILITY OF SUCH DAMAGE.
\xe1\xbf\xb8 = 0x1ff8 = 8184
\xf0\x90\x90\x80 = 0x10400 = 66560
\xf0\x90\x90\xa8 = 0x10428 = 66600
+ \xc7\x84 = 0x1c4 = 452
+ \xc7\x85 = 0x1c5 = 453
+ \xc7\x86 = 0x1c6 = 454
+
Mark property:
\xcc\x8d = 0x30d = 781
Special:
+ \xc2\x80 = 0x80 = 128 (lowest 2 byte character)
\xdf\xbf = 0x7ff = 2047 (highest 2 byte character)
\xe0\xa0\x80 = 0x800 = 2048 (lowest 2 byte character)
\xef\xbf\xbf = 0xffff = 65535 (highest 3 byte character)
@@ -332,6 +337,16 @@ static struct regression_test_case regression_test_cases[] = {
{ MUA, 0, "x[^bcdl]+", "xlxbxaekmd" },
{ MUA, 0, "x[^bcdghi]+", "xbxdxgxaefji" },
{ MUA, 0, "x[B-Fb-f]+", "xaxAxgxbfBFG" },
+ { CMUA, 0, "\\x{e9}+", "#\xf0\x90\x90\xa8\xc3\xa8\xc3\xa9\xc3\x89\xc3\x88" },
+ { CMUA, 0, "[^\\x{e9}]+", "\xc3\xa9#\xf0\x90\x90\xa8\xc3\xa8\xc3\x88\xc3\x89" },
+ { MUA, 0, "[\\x02\\x7e]+", "\xc3\x81\xe1\xbf\xb8\xf0\x90\x90\xa8\x01\x02\x7e\x7f" },
+ { MUA, 0, "[^\\x02\\x7e]+", "\x02\xc3\x81\xe1\xbf\xb8\xf0\x90\x90\xa8\x01\x7f\x7e" },
+ { MUA, 0, "[\\x{81}-\\x{7fe}]+", "#\xe1\xbf\xb8\xf0\x90\x90\xa8\xc2\x80\xc2\x81\xdf\xbe\xdf\xbf" },
+ { MUA, 0, "[^\\x{81}-\\x{7fe}]+", "\xc2\x81#\xe1\xbf\xb8\xf0\x90\x90\xa8\xc2\x80\xdf\xbf\xdf\xbe" },
+ { MUA, 0, "[\\x{801}-\\x{fffe}]+", "#\xc3\xa9\xf0\x90\x90\x80\xe0\xa0\x80\xe0\xa0\x81\xef\xbf\xbe\xef\xbf\xbf" },
+ { MUA, 0, "[^\\x{801}-\\x{fffe}]+", "\xe0\xa0\x81#\xc3\xa9\xf0\x90\x90\x80\xe0\xa0\x80\xef\xbf\xbf\xef\xbf\xbe" },
+ { MUA, 0, "[\\x{10001}-\\x{10fffe}]+", "#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf0\x90\x80\x81\xf4\x8f\xbf\xbe\xf4\x8f\xbf\xbf" },
+ { MUA, 0, "[^\\x{10001}-\\x{10fffe}]+", "\xf0\x90\x80\x81#\xc3\xa9\xe2\xb1\xa5\xf0\x90\x80\x80\xf4\x8f\xbf\xbf\xf4\x8f\xbf\xbe" },
/* Unicode properties. */
{ MUAP, 0, "[1-5\xc3\xa9\\w]", "\xc3\xa1_" },