1 /-- This set of tests is run only with the 8-bit library. They do not require
2 UTF-8 or Unicode property support. The file starts with all the tests of
3 the POSIX interface, because that is supported only with the 8-bit library.
12 No match: POSIX code 17: match failed
30 /the quick brown fox/P
32 0: the quick brown fox
34 No match: POSIX code 17: match failed
36 No match: POSIX code 17: match failed
38 /the quick brown fox/Pi
40 0: the quick brown fox
42 0: The Quick Brown Fox
46 No match: POSIX code 17: match failed
48 No match: POSIX code 17: match failed
57 Failed: POSIX code 15: bad back reference at offset 7
61 No match: POSIX code 17: match failed
96 No match: POSIX code 17: match failed
98 No match: POSIX code 17: match failed
110 Matched with REG_NOSUB
114 Matched with REG_NOSUB
122 No match: POSIX code 17: match failed
138 Failed: POSIX code 9: bad escape sequence at offset 4
140 /-- End of POSIX tests --/
147 ** Failers (too big char)
150 ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
151 ** Truncation will probably give the wrong result.
154 ** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
155 ** Truncation will probably give the wrong result.
159 Failed: character value in \x{} or \o{} is too large at offset 6
162 Failed: character value in \x{} or \o{} is too large at offset 6
165 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
166 \) )* # optional leading comment
168 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
169 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
171 " (?: # opening quote...
172 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
174 \\ [^\x80-\xff] # Escaped something (something != CR)
177 (?: (?: [\040\t] | \(
178 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
179 \) )* \. (?: [\040\t] | \(
180 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
182 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
183 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
185 " (?: # opening quote...
186 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
188 \\ [^\x80-\xff] # Escaped something (something != CR)
190 ) )* # further okay, if led by a period
192 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
193 \) )* @ (?: [\040\t] | \(
194 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
196 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
197 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
199 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
201 ) # initial subdomain
204 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
205 \) )* \. # if led by a period...
207 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
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 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
219 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
220 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
222 " (?: # opening quote...
223 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
225 \\ [^\x80-\xff] # Escaped something (something != CR)
227 ) # one word, optionally followed by....
229 [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or...
231 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
232 \) | # comments, or...
234 " (?: # opening quote...
235 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
237 \\ [^\x80-\xff] # Escaped something (something != CR)
242 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
244 (?: @ (?: [\040\t] | \(
245 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
247 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
248 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
250 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
252 ) # initial subdomain
255 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
256 \) )* \. # if led by a period...
258 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
260 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
261 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
263 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
268 (?: (?: [\040\t] | \(
269 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
270 \) )* , (?: [\040\t] | \(
271 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
272 \) )* @ (?: [\040\t] | \(
273 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
275 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
276 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
278 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
280 ) # initial subdomain
283 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
284 \) )* \. # if led by a period...
286 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
288 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
289 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
291 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
295 )* # further okay, if led by comma
298 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
299 \) )* )? # optional route
301 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
302 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
304 " (?: # opening quote...
305 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
307 \\ [^\x80-\xff] # Escaped something (something != CR)
310 (?: (?: [\040\t] | \(
311 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
312 \) )* \. (?: [\040\t] | \(
313 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
315 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
316 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
318 " (?: # opening quote...
319 [^\\\x80-\xff\n\015"] # Anything except backslash and quote
321 \\ [^\x80-\xff] # Escaped something (something != CR)
323 ) )* # further okay, if led by a period
325 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
326 \) )* @ (?: [\040\t] | \(
327 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
329 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
330 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
332 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
334 ) # initial subdomain
337 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
338 \) )* \. # if led by a period...
340 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
342 [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters...
343 (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
345 (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff
351 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
355 (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )*
356 \) )* # optional trailing comment
358 Capturing subpattern count = 0
359 Contains explicit CR or LF match
363 Subject length lower bound = 3
364 Starting chars: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
365 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
366 f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
368 /-- Although this saved pattern was compiled with link-size=2, it does no harm
369 to run this test with other link sizes because it is going to generated a
370 "compiled in wrong mode" error as soon as it is loaded, so the link size does
374 Compiled pattern loaded from testsaved16
376 Error -28 from pcre_fullinfo(0)
377 Running in 8-bit mode but pattern was compiled in 16-bit mode
380 Compiled pattern loaded from testsaved32
382 Error -28 from pcre_fullinfo(0)
383 Running in 8-bit mode but pattern was compiled in 32-bit mode
386 Capturing subpattern count = 0
390 Subject length lower bound = 1
391 Starting chars: \x09 \x20 \xa0
394 Capturing subpattern count = 0
398 Subject length lower bound = 1
399 No starting char list
402 Capturing subpattern count = 0
406 Subject length lower bound = 1
407 Starting chars: \x0a \x0b \x0c \x0d \x85
410 Capturing subpattern count = 0
414 Subject length lower bound = 1
415 No starting char list
418 Capturing subpattern count = 0
422 Subject length lower bound = 1
423 Starting chars: \x0a \x0b \x0c \x0d \x85
426 ------------------------------------------------------------------
431 ------------------------------------------------------------------
436 ------------------------------------------------------------------
441 ------------------------------------------------------------------
446 ------------------------------------------------------------------
451 ------------------------------------------------------------------
454 ------------------------------------------------------------------
456 [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
459 ------------------------------------------------------------------
462 ------------------------------------------------------------------
464 [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
467 ------------------------------------------------------------------
470 ------------------------------------------------------------------
472 [\x00-\x09\x0e-\x84\x86-\xff]
475 ------------------------------------------------------------------
478 ------------------------------------------------------------------
480 [\x00-\x0a\x0e-\x84\x86-\xff]
483 ------------------------------------------------------------------
486 Failed: octal value is greater than \377 in 8-bit non-UTF-8 mode at offset 3
488 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/K
489 Failed: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN) at offset 259
491 /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/K
494 MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
497 Failed: character value in \u.... sequence is too large at offset 5
499 /[\u0100-\u0200]/<JS>
500 Failed: character value in \u.... sequence is too large at offset 6
502 /[^\x00-a]{12,}[^b-\xff]*/BZ
503 ------------------------------------------------------------------
509 ------------------------------------------------------------------
511 /[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/BZ
512 ------------------------------------------------------------------
514 [\x00-\x08\x0e-\x1f!-\xff] (neg)*+
520 [\x00-/:-\xff] (neg)*+
523 [\x00-/:-@[-^`{-\xff] (neg){4,6}+
528 ------------------------------------------------------------------
530 /-- End of testinput14 --/