/[pcre]/code/trunk/testdata/testoutput14
ViewVC logotype

Contents of /code/trunk/testdata/testoutput14

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1055 - (show annotations)
Tue Oct 16 15:53:30 2012 UTC (7 years ago) by chpe
File size: 16600 byte(s)
pcre32: Add 32-bit library

Create libpcre32 that operates on 32-bit characters (UTF-32).

This turned out to be surprisingly simple after the UTF-16 support
was introduced; mostly just extra ifdefs and adjusting and adding
some tests.
1 /-- This set of tests is run only with the 8-bit library. It starts with all
2 the tests of the POSIX interface, because that is supported only with the
3 8-bit library. --/
4
5 /abc/P
6 abc
7 0: abc
8 *** Failers
9 No match: POSIX code 17: match failed
10
11 /^abc|def/P
12 abcdef
13 0: abc
14 abcdef\B
15 0: def
16
17 /.*((abc)$|(def))/P
18 defabc
19 0: defabc
20 1: abc
21 2: abc
22 \Zdefabc
23 0: def
24 1: def
25 3: def
26
27 /the quick brown fox/P
28 the quick brown fox
29 0: the quick brown fox
30 *** Failers
31 No match: POSIX code 17: match failed
32 The Quick Brown Fox
33 No match: POSIX code 17: match failed
34
35 /the quick brown fox/Pi
36 the quick brown fox
37 0: the quick brown fox
38 The Quick Brown Fox
39 0: The Quick Brown Fox
40
41 /abc.def/P
42 *** Failers
43 No match: POSIX code 17: match failed
44 abc\ndef
45 No match: POSIX code 17: match failed
46
47 /abc$/P
48 abc
49 0: abc
50 abc\n
51 0: abc
52
53 /(abc)\2/P
54 Failed: POSIX code 15: bad back reference at offset 7
55
56 /(abc\1)/P
57 abc
58 No match: POSIX code 17: match failed
59
60 /a*(b+)(z)(z)/P
61 aaaabbbbzzzz
62 0: aaaabbbbzz
63 1: bbbb
64 2: z
65 3: z
66 aaaabbbbzzzz\O0
67 aaaabbbbzzzz\O1
68 0: aaaabbbbzz
69 aaaabbbbzzzz\O2
70 0: aaaabbbbzz
71 1: bbbb
72 aaaabbbbzzzz\O3
73 0: aaaabbbbzz
74 1: bbbb
75 2: z
76 aaaabbbbzzzz\O4
77 0: aaaabbbbzz
78 1: bbbb
79 2: z
80 3: z
81 aaaabbbbzzzz\O5
82 0: aaaabbbbzz
83 1: bbbb
84 2: z
85 3: z
86
87 /ab.cd/P
88 ab-cd
89 0: ab-cd
90 ab=cd
91 0: ab=cd
92 ** Failers
93 No match: POSIX code 17: match failed
94 ab\ncd
95 No match: POSIX code 17: match failed
96
97 /ab.cd/Ps
98 ab-cd
99 0: ab-cd
100 ab=cd
101 0: ab=cd
102 ab\ncd
103 0: ab\x0acd
104
105 /a(b)c/PN
106 abc
107 Matched with REG_NOSUB
108
109 /a(?P<name>b)c/PN
110 abc
111 Matched with REG_NOSUB
112
113 /a?|b?/P
114 abc
115 0: a
116 ** Failers
117 0:
118 ddd\N
119 No match: POSIX code 17: match failed
120
121 /\w+A/P
122 CDAAAAB
123 0: CDAAAA
124
125 /\w+A/PU
126 CDAAAAB
127 0: CDA
128
129 /\Biss\B/I+P
130 Mississippi
131 0: iss
132 0+ issippi
133
134 /abc/\P
135 Failed: POSIX code 9: bad escape sequence at offset 4
136
137 /-- End of POSIX tests --/
138
139 /a\Cb/
140 aXb
141 0: aXb
142 a\nb
143 0: a\x0ab
144 ** Failers (too big char)
145 No match
146 A\x{123}B
147 ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
148 ** Truncation will probably give the wrong result.
149 No match
150
151 /\x{100}/I
152 Failed: character value in \x{...} sequence is too large at offset 6
153
154 / (?: [\040\t] | \(
155 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
156 \) )* # optional leading comment
157 (?: (?:
158 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
159 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
160 |
161 " (?: # opening quote...
162 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
163 | # or
164 \\ [^\x80-\xff] # Escaped something (something != CR)
165 )* " # closing quote
166 ) # initial word
167 (?: (?: [\040\t] | \(
168 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
169 \) )* \. (?: [\040\t] | \(
170 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
171 \) )* (?:
172 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
173 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
174 |
175 " (?: # opening quote...
176 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
177 | # or
178 \\ [^\x80-\xff] # Escaped something (something != CR)
179 )* " # closing quote
180 ) )* # further okay, if led by a period
181 (?: [\040\t] | \(
182 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
183 \) )* @ (?: [\040\t] | \(
184 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
185 \) )* (?:
186 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
187 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
188 | \[ # [
189 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
190 \] # ]
191 ) # initial subdomain
192 (?: #
193 (?: [\040\t] | \(
194 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
195 \) )* \. # if led by a period...
196 (?: [\040\t] | \(
197 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
198 \) )* (?:
199 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
200 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
201 | \[ # [
202 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
203 \] # ]
204 ) # ...further okay
205 )*
206 # address
207 | # or
208 (?:
209 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
210 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
211 |
212 " (?: # opening quote...
213 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
214 | # or
215 \\ [^\x80-\xff] # Escaped something (something != CR)
216 )* " # closing quote
217 ) # one word, optionally followed by....
218 (?:
219 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
220 \(
221 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
222 \) | # comments, or...
223
224 " (?: # opening quote...
225 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
226 | # or
227 \\ [^\x80-\xff] # Escaped something (something != CR)
228 )* " # closing quote
229 # quoted strings
230 )*
231 < (?: [\040\t] | \(
232 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
233 \) )* # leading <
234 (?: @ (?: [\040\t] | \(
235 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
236 \) )* (?:
237 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
238 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
239 | \[ # [
240 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
241 \] # ]
242 ) # initial subdomain
243 (?: #
244 (?: [\040\t] | \(
245 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
246 \) )* \. # if led by a period...
247 (?: [\040\t] | \(
248 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
249 \) )* (?:
250 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
251 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
252 | \[ # [
253 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
254 \] # ]
255 ) # ...further okay
256 )*
257
258 (?: (?: [\040\t] | \(
259 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
260 \) )* , (?: [\040\t] | \(
261 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
262 \) )* @ (?: [\040\t] | \(
263 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
264 \) )* (?:
265 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
266 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
267 | \[ # [
268 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
269 \] # ]
270 ) # initial subdomain
271 (?: #
272 (?: [\040\t] | \(
273 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
274 \) )* \. # if led by a period...
275 (?: [\040\t] | \(
276 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
277 \) )* (?:
278 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
279 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
280 | \[ # [
281 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
282 \] # ]
283 ) # ...further okay
284 )*
285 )* # further okay, if led by comma
286 : # closing colon
287 (?: [\040\t] | \(
288 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
289 \) )* )? # optional route
290 (?:
291 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
292 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
293 |
294 " (?: # opening quote...
295 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
296 | # or
297 \\ [^\x80-\xff] # Escaped something (something != CR)
298 )* " # closing quote
299 ) # initial word
300 (?: (?: [\040\t] | \(
301 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
302 \) )* \. (?: [\040\t] | \(
303 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
304 \) )* (?:
305 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
306 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
307 |
308 " (?: # opening quote...
309 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
310 | # or
311 \\ [^\x80-\xff] # Escaped something (something != CR)
312 )* " # closing quote
313 ) )* # further okay, if led by a period
314 (?: [\040\t] | \(
315 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
316 \) )* @ (?: [\040\t] | \(
317 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
318 \) )* (?:
319 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
320 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
321 | \[ # [
322 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
323 \] # ]
324 ) # initial subdomain
325 (?: #
326 (?: [\040\t] | \(
327 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
328 \) )* \. # if led by a period...
329 (?: [\040\t] | \(
330 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
331 \) )* (?:
332 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
333 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
334 | \[ # [
335 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
336 \] # ]
337 ) # ...further okay
338 )*
339 # address spec
340 (?: [\040\t] | \(
341 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
342 \) )* > # trailing >
343 # name and address
344 ) (?: [\040\t] | \(
345 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
346 \) )* # optional trailing comment
347 /xSI
348 Capturing subpattern count = 0
349 Contains explicit CR or LF match
350 Options: extended
351 No first char
352 No need char
353 Subject length lower bound = 3
354 Starting byte set: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
355 9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e
356 f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
357
358 /-- Although this saved pattern was compiled with link-size=2, it does no harm
359 to run this test with other link sizes because it is going to generated a
360 "compiled in wrong mode" error as soon as it is loaded, so the link size does
361 not matter. --/
362
363 <!testsaved16
364 Compiled pattern loaded from testsaved16
365 No study data
366 Error -28 from pcre_fullinfo(0)
367 Running in 8-bit mode but pattern was compiled in 16-bit mode
368
369 <!testsaved32
370 Compiled pattern loaded from testsaved32
371 No study data
372 Error -28 from pcre_fullinfo(0)
373 Running in 8-bit mode but pattern was compiled in 32-bit mode
374
375 /\h/SI
376 Capturing subpattern count = 0
377 No options
378 No first char
379 No need char
380 Subject length lower bound = 1
381 Starting byte set: \x09 \x20 \xa0
382
383 /\v/SI
384 Capturing subpattern count = 0
385 No options
386 No first char
387 No need char
388 Subject length lower bound = 1
389 Starting byte set: \x0a \x0b \x0c \x0d \x85
390
391 /\R/SI
392 Capturing subpattern count = 0
393 No options
394 No first char
395 No need char
396 Subject length lower bound = 1
397 Starting byte set: \x0a \x0b \x0c \x0d \x85
398
399 /[\h]/BZ
400 ------------------------------------------------------------------
401 Bra
402 [\x09 \xa0]
403 Ket
404 End
405 ------------------------------------------------------------------
406 >\x09<
407 0: \x09
408
409 /[\h]+/BZ
410 ------------------------------------------------------------------
411 Bra
412 [\x09 \xa0]+
413 Ket
414 End
415 ------------------------------------------------------------------
416 >\x09\x20\xa0<
417 0: \x09 \xa0
418
419 /[\v]/BZ
420 ------------------------------------------------------------------
421 Bra
422 [\x0a-\x0d\x85]
423 Ket
424 End
425 ------------------------------------------------------------------
426
427 /[\H]/BZ
428 ------------------------------------------------------------------
429 Bra
430 [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
431 Ket
432 End
433 ------------------------------------------------------------------
434
435 /[^\h]/BZ
436 ------------------------------------------------------------------
437 Bra
438 [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
439 Ket
440 End
441 ------------------------------------------------------------------
442
443 /[\V]/BZ
444 ------------------------------------------------------------------
445 Bra
446 [\x00-\x09\x0e-\x84\x86-\xff]
447 Ket
448 End
449 ------------------------------------------------------------------
450
451 /[\x0a\V]/BZ
452 ------------------------------------------------------------------
453 Bra
454 [\x00-\x0a\x0e-\x84\x86-\xff]
455 Ket
456 End
457 ------------------------------------------------------------------
458
459 /\777/I
460 Failed: octal value is greater than \377 in 8-bit non-UTF-8 mode at offset 3
461
462 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/K
463 Failed: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) at offset 259
464
465 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/K
466 XX
467 0: XX
468 MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
469
470 /\u0100/<JS>
471 Failed: character value in \u.... sequence is too large at offset 5
472
473 /[\u0100-\u0200]/<JS>
474 Failed: character value in \u.... sequence is too large at offset 6
475
476 /-- End of testinput14 --/

  ViewVC Help
Powered by ViewVC 1.1.5