new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / external / pcre2-10.32 / testdata / testoutput22-8
1 # Tests of \C when Unicode support is available. Note that \C is not supported
2 # for DFA matching in UTF mode, so this test is not run with -dfa. The output
3 # of this test is different in 8-, 16-, and 32-bit modes. Some tests may match
4 # in some widths and not in others.
5
6 /ab\Cde/utf,info
7 Capturing subpattern count = 0
8 Contains \C
9 Options: utf
10 First code unit = 'a'
11 Last code unit = 'e'
12 Subject length lower bound = 0
13     abXde
14  0: abXde
15
16 # This should produce an error diagnostic (\C in UTF lookbehind) in 8-bit and
17 # 16-bit modes, but not in 32-bit mode.
18
19 /(?<=ab\Cde)X/utf
20 Failed: error 136 at offset 0: \C is not allowed in a lookbehind assertion in UTF-8 mode
21     ab!deXYZ
22
23 # Autopossessification tests
24
25 /\C+\X \X+\C/Bx
26 ------------------------------------------------------------------
27         Bra
28         AllAny+
29         extuni
30         extuni+
31         AllAny
32         Ket
33         End
34 ------------------------------------------------------------------
35
36 /\C+\X \X+\C/Bx,utf
37 ------------------------------------------------------------------
38         Bra
39         Anybyte+
40         extuni
41         extuni+
42         Anybyte
43         Ket
44         End
45 ------------------------------------------------------------------
46
47 /\C\X*TӅ;\r
48 {0,6}\v+\rF
49 /utf
50 \= Expect no match
51     Ӆ\x0a
52 No match
53
54 /\C(\W?ſ)'?{{/utf
55 \= Expect no match
56     \\C(\\W?ſ)'?{{
57 No match
58
59 /X(\C{3})/utf
60     X\x{1234}
61  0: X\x{1234}
62  1: \x{1234}
63     X\x{11234}Y
64  0: X\x{f0}\x{91}\x{88}
65  1: \x{f0}\x{91}\x{88}
66     X\x{11234}YZ
67  0: X\x{f0}\x{91}\x{88}
68  1: \x{f0}\x{91}\x{88}
69
70 /X(\C{4})/utf
71     X\x{1234}YZ
72  0: X\x{1234}Y
73  1: \x{1234}Y
74     X\x{11234}YZ
75  0: X\x{11234}
76  1: \x{11234}
77     X\x{11234}YZW
78  0: X\x{11234}
79  1: \x{11234}
80
81 /X\C*/utf
82     XYZabcdce
83  0: XYZabcdce
84
85 /X\C*?/utf
86     XYZabcde
87  0: X
88
89 /X\C{3,5}/utf
90     Xabcdefg
91  0: Xabcde
92     X\x{1234}
93  0: X\x{1234}
94     X\x{1234}YZ
95  0: X\x{1234}YZ
96     X\x{1234}\x{512}
97  0: X\x{1234}\x{512}
98     X\x{1234}\x{512}YZ
99  0: X\x{1234}\x{512}
100     X\x{11234}Y
101  0: X\x{11234}Y
102     X\x{11234}YZ
103  0: X\x{11234}Y
104     X\x{11234}\x{512}
105  0: X\x{11234}\x{d4}
106     X\x{11234}\x{512}YZ
107  0: X\x{11234}\x{d4}
108     X\x{11234}\x{512}\x{11234}Z
109  0: X\x{11234}\x{d4}
110
111 /X\C{3,5}?/utf
112     Xabcdefg
113  0: Xabc
114     X\x{1234}
115  0: X\x{1234}
116     X\x{1234}YZ
117  0: X\x{1234}
118     X\x{1234}\x{512}
119  0: X\x{1234}
120     X\x{11234}Y
121  0: X\x{f0}\x{91}\x{88}
122     X\x{11234}YZ
123  0: X\x{f0}\x{91}\x{88}
124     X\x{11234}\x{512}YZ
125  0: X\x{f0}\x{91}\x{88}
126     X\x{11234}
127  0: X\x{f0}\x{91}\x{88}
128
129 /a\Cb/utf
130     aXb
131  0: aXb
132     a\nb
133  0: a\x{0a}b
134     a\x{100}b
135 No match
136
137 /a\C\Cb/utf
138     a\x{100}b
139  0: a\x{100}b
140     a\x{12257}b
141 No match
142     a\x{12257}\x{11234}b
143 No match
144
145 /ab\Cde/utf
146     abXde
147  0: abXde
148
149 # This one is here not because it's different to Perl, but because the way
150 # the captured single code unit is displayed. (In Perl it becomes a character,
151 # and you can't tell the difference.)
152
153 /X(\C)(.*)/utf
154     X\x{1234}
155  0: X\x{1234}
156  1: \x{e1}
157  2: \x{88}\x{b4}
158     X\nabc
159  0: X\x{0a}abc
160  1: \x{0a}
161  2: abc
162
163 # This one is here because Perl gives out a grumbly error message (quite
164 # correctly, but that messes up comparisons).
165
166 /a\Cb/utf
167 \= Expect no match in 8-bit mode
168     a\x{100}b
169 No match
170
171 /^ab\C/utf,no_start_optimize
172 \= Expect no match - tests \C at end of subject
173     ab
174 No match
175
176 /\C[^\v]+\x80/utf
177     [AΏBŀC]
178 No match
179
180 /\C[^\d]+\x80/utf
181     [AΏBŀC]
182 No match
183
184 # End of testinput22