xref: /aosp_15_r20/external/pcre/testdata/testinput14 (revision 22dc650d8ae982c6770746019a6f94af92b0f024)
1# These test special UTF and UCP features of DFA matching. The output is
2# different for the different widths.
3
4#subject dfa
5
6# ----------------------------------------------------
7# These are a selection of the more comprehensive tests that are run for
8# non-DFA matching.
9
10/X/utf
11    XX\x{d800}
12    XX\x{d800}\=offset=3
13    XX\x{d800}\=no_utf_check
14    XX\x{da00}
15    XX\x{da00}\=no_utf_check
16    XX\x{dc00}
17    XX\x{dc00}\=no_utf_check
18    XX\x{de00}
19    XX\x{de00}\=no_utf_check
20    XX\x{dfff}
21    XX\x{dfff}\=no_utf_check
22    XX\x{110000}
23    XX\x{d800}\x{1234}
24
25/badutf/utf
26    X\xdf
27    XX\xef
28    XXX\xef\x80
29    X\xf7
30    XX\xf7\x80
31    XXX\xf7\x80\x80
32
33/shortutf/utf
34    XX\xdf\=ph
35    XX\xef\=ph
36    XX\xef\x80\=ph
37    \xf7\=ph
38    \xf7\x80\=ph
39
40# ----------------------------------------------------
41# UCP and casing tests - except for the first two, these will all fail in 8-bit
42# mode because they are testing UCP without UTF and use characters > 255.
43
44/\x{c1}/i,no_start_optimize
45\= Expect no match
46    \x{e1}
47
48/\x{c1}+\x{e1}/iB,ucp
49    \x{c1}\x{c1}\x{c1}
50    \x{e1}\x{e1}\x{e1}
51
52/\x{120}\x{c1}/i,ucp,no_start_optimize
53    \x{121}\x{e1}
54
55/\x{120}\x{c1}/i,ucp
56    \x{121}\x{e1}
57
58/[^\x{120}]/i,no_start_optimize
59    \x{121}
60
61/[^\x{120}]/i,ucp,no_start_optimize
62\= Expect no match
63    \x{121}
64
65/[^\x{120}]/i
66    \x{121}
67
68/[^\x{120}]/i,ucp
69\= Expect no match
70    \x{121}
71
72/\x{120}{2}/i,ucp
73    \x{121}\x{121}
74
75/[^\x{120}]{2}/i,ucp
76\= Expect no match
77    \x{121}\x{121}
78
79# ----------------------------------------------------
80
81# ----------------------------------------------------
82# Tests for handling 0xffffffff in caseless UCP mode. They only apply to 32-bit
83# mode; for the other widths they will fail.
84
85/k*\x{ffffffff}/caseless,ucp
86    \x{ffffffff}
87
88/k+\x{ffffffff}/caseless,ucp,no_start_optimize
89    K\x{ffffffff}
90\= Expect no match
91    \x{ffffffff}\x{ffffffff}
92
93/k{2}\x{ffffffff}/caseless,ucp,no_start_optimize
94\= Expect no match
95    \x{ffffffff}\x{ffffffff}\x{ffffffff}
96
97/k\x{ffffffff}/caseless,ucp,no_start_optimize
98    K\x{ffffffff}
99\= Expect no match
100    \x{ffffffff}\x{ffffffff}\x{ffffffff}
101
102/k{2,}?Z/caseless,ucp,no_start_optimize,no_auto_possess
103\= Expect no match
104    Kk\x{ffffffff}\x{ffffffff}\x{ffffffff}Z
105
106# ----------------------------------------------------
107
108# End of testinput14
109