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
9
No match: POSIX code 17: match failed
27
/the quick brown fox/P
29
0: the quick brown fox
31
No match: POSIX code 17: match failed
33
No match: POSIX code 17: match failed
35
/the quick brown fox/Pi
37
0: the quick brown fox
39
0: The Quick Brown Fox
43
No match: POSIX code 17: match failed
45
No match: POSIX code 17: match failed
54
Failed: POSIX code 15: bad back reference at offset 7
58
No match: POSIX code 17: match failed
93
No match: POSIX code 17: match failed
95
No match: POSIX code 17: match failed
107
Matched with REG_NOSUB
111
Matched with REG_NOSUB
119
No match: POSIX code 17: match failed
135
Failed: POSIX code 9: bad escape sequence at offset 4
137
/-- End of POSIX tests --/
144
** Failers (too big char)
147
** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
148
** Truncation will probably give the wrong result.
152
Failed: character value in \x{...} sequence is too large at offset 6
155
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
156
\) )* # optional leading comment
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
161
" (?: # opening quote...
162
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
164
\\ [^\x80-\xff] # Escaped something (something != CR)
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] )* \) )*
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
175
" (?: # opening quote...
176
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
178
\\ [^\x80-\xff] # Escaped something (something != CR)
180
) )* # further okay, if led by a period
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] )* \) )*
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
189
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
191
) # initial subdomain
194
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
195
\) )* \. # if led by a period...
197
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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
202
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
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
212
" (?: # opening quote...
213
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
215
\\ [^\x80-\xff] # Escaped something (something != CR)
217
) # one word, optionally followed by....
219
[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
221
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
222
\) | # comments, or...
224
" (?: # opening quote...
225
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
227
\\ [^\x80-\xff] # Escaped something (something != CR)
232
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
234
(?: @ (?: [\040\t] | \(
235
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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
240
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
242
) # initial subdomain
245
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
246
\) )* \. # if led by a period...
248
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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
253
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
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] )* \) )*
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
268
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
270
) # initial subdomain
273
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
274
\) )* \. # if led by a period...
276
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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
281
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
285
)* # further okay, if led by comma
288
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
289
\) )* )? # optional route
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
294
" (?: # opening quote...
295
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
297
\\ [^\x80-\xff] # Escaped something (something != CR)
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] )* \) )*
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
308
" (?: # opening quote...
309
[^\\\x80-\xff\n\015"] # Anything except backslash and quote
311
\\ [^\x80-\xff] # Escaped something (something != CR)
313
) )* # further okay, if led by a period
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] )* \) )*
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
322
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
324
) # initial subdomain
327
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
328
\) )* \. # if led by a period...
330
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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
335
(?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
341
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
345
(?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
346
\) )* # optional trailing comment
348
Capturing subpattern count = 0
349
Contains explicit CR or LF match
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
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
364
Compiled pattern loaded from testsaved16
366
Error -28 from pcre_fullinfo(0)
367
Running in 8-bit mode but pattern was compiled in 16-bit mode
370
Capturing subpattern count = 0
374
Subject length lower bound = 1
375
Starting byte set: \x09 \x20 \xa0
378
Capturing subpattern count = 0
382
Subject length lower bound = 1
383
Starting byte set: \x0a \x0b \x0c \x0d \x85
386
Capturing subpattern count = 0
390
Subject length lower bound = 1
391
Starting byte set: \x0a \x0b \x0c \x0d \x85
394
------------------------------------------------------------------
399
------------------------------------------------------------------
404
------------------------------------------------------------------
409
------------------------------------------------------------------
414
------------------------------------------------------------------
419
------------------------------------------------------------------
422
------------------------------------------------------------------
424
[\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
427
------------------------------------------------------------------
430
------------------------------------------------------------------
432
[\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
435
------------------------------------------------------------------
438
------------------------------------------------------------------
440
[\x00-\x09\x0e-\x84\x86-\xff]
443
------------------------------------------------------------------
446
------------------------------------------------------------------
448
[\x00-\x0a\x0e-\x84\x86-\xff]
451
------------------------------------------------------------------
454
Failed: octal value is greater than \377 in 8-bit non-UTF-8 mode at offset 3
456
/-- End of testinput14 --/