1# This set of tests is run only with the 8-bit library. They must not require
2# UTF-8 or Unicode property support. */
3
4#forbid_utf
5#newline_default lf any anycrlf
6
7/ab/
8\= Expect error message (too big char) and no match
9    A\x{123}B
10** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
11** Truncation will probably give the wrong result.
12No match
13    A\o{443}B
14** Character \x{123} is greater than 255 and UTF-8 mode is not enabled.
15** Truncation will probably give the wrong result.
16No match
17
18/\x{100}/I
19Failed: error 134 at offset 6: character code point value in \x{} or \o{} is too large
20
21/\o{400}/I
22Failed: error 134 at offset 6: character code point value in \x{} or \o{} is too large
23
24/  (?: [\040\t] |  \(
25(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
26\)  )*                          # optional leading comment
27(?:    (?:
28[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
29(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
30|
31" (?:                      # opening quote...
32[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
33|                     #    or
34\\ [^\x80-\xff]           #   Escaped something (something != CR)
35)* "  # closing quote
36)                    # initial word
37(?:  (?: [\040\t] |  \(
38(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
39\)  )*  \.  (?: [\040\t] |  \(
40(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
41\)  )*   (?:
42[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
43(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
44|
45" (?:                      # opening quote...
46[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
47|                     #    or
48\\ [^\x80-\xff]           #   Escaped something (something != CR)
49)* "  # closing quote
50)  )* # further okay, if led by a period
51(?: [\040\t] |  \(
52(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
53\)  )*  @  (?: [\040\t] |  \(
54(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
55\)  )*    (?:
56[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
57(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
58|   \[                         # [
59(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
60\]                        #           ]
61)                           # initial subdomain
62(?:                                  #
63(?: [\040\t] |  \(
64(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
65\)  )*  \.                        # if led by a period...
66(?: [\040\t] |  \(
67(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
68\)  )*   (?:
69[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
70(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
71|   \[                         # [
72(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
73\]                        #           ]
74)                     #   ...further okay
75)*
76# address
77|                     #  or
78(?:
79[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
80(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
81|
82" (?:                      # opening quote...
83[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
84|                     #    or
85\\ [^\x80-\xff]           #   Escaped something (something != CR)
86)* "  # closing quote
87)             # one word, optionally followed by....
88(?:
89[^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037]  |  # atom and space parts, or...
90\(
91(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
92\)       |  # comments, or...
93
94" (?:                      # opening quote...
95[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
96|                     #    or
97\\ [^\x80-\xff]           #   Escaped something (something != CR)
98)* "  # closing quote
99# quoted strings
100)*
101<  (?: [\040\t] |  \(
102(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
103\)  )*                     # leading <
104(?:  @  (?: [\040\t] |  \(
105(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
106\)  )*    (?:
107[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
108(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
109|   \[                         # [
110(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
111\]                        #           ]
112)                           # initial subdomain
113(?:                                  #
114(?: [\040\t] |  \(
115(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
116\)  )*  \.                        # if led by a period...
117(?: [\040\t] |  \(
118(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
119\)  )*   (?:
120[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
121(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
122|   \[                         # [
123(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
124\]                        #           ]
125)                     #   ...further okay
126)*
127
128(?:  (?: [\040\t] |  \(
129(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
130\)  )*  ,  (?: [\040\t] |  \(
131(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
132\)  )*  @  (?: [\040\t] |  \(
133(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
134\)  )*    (?:
135[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
136(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
137|   \[                         # [
138(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
139\]                        #           ]
140)                           # initial subdomain
141(?:                                  #
142(?: [\040\t] |  \(
143(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
144\)  )*  \.                        # if led by a period...
145(?: [\040\t] |  \(
146(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
147\)  )*   (?:
148[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
149(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
150|   \[                         # [
151(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
152\]                        #           ]
153)                     #   ...further okay
154)*
155)* # further okay, if led by comma
156:                                # closing colon
157(?: [\040\t] |  \(
158(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
159\)  )*  )? #       optional route
160(?:
161[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
162(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
163|
164" (?:                      # opening quote...
165[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
166|                     #    or
167\\ [^\x80-\xff]           #   Escaped something (something != CR)
168)* "  # closing quote
169)                    # initial word
170(?:  (?: [\040\t] |  \(
171(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
172\)  )*  \.  (?: [\040\t] |  \(
173(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
174\)  )*   (?:
175[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
176(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
177|
178" (?:                      # opening quote...
179[^\\\x80-\xff\n\015"]                #   Anything except backslash and quote
180|                     #    or
181\\ [^\x80-\xff]           #   Escaped something (something != CR)
182)* "  # closing quote
183)  )* # further okay, if led by a period
184(?: [\040\t] |  \(
185(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
186\)  )*  @  (?: [\040\t] |  \(
187(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
188\)  )*    (?:
189[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
190(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
191|   \[                         # [
192(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
193\]                        #           ]
194)                           # initial subdomain
195(?:                                  #
196(?: [\040\t] |  \(
197(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
198\)  )*  \.                        # if led by a period...
199(?: [\040\t] |  \(
200(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
201\)  )*   (?:
202[^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+    # some number of atom characters...
203(?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom
204|   \[                         # [
205(?: [^\\\x80-\xff\n\015\[\]] |  \\ [^\x80-\xff]  )*    #    stuff
206\]                        #           ]
207)                     #   ...further okay
208)*
209#       address spec
210(?: [\040\t] |  \(
211(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
212\)  )*  > #                  trailing >
213# name and address
214)  (?: [\040\t] |  \(
215(?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  |  \( (?:  [^\\\x80-\xff\n\015()]  |  \\ [^\x80-\xff]  )* \)  )*
216\)  )*                       # optional trailing comment
217/Ix
218Capture group count = 0
219Contains explicit CR or LF match
220Options: extended
221Starting code units: \x09 \x20 ! " # $ % & ' ( * + - / 0 1 2 3 4 5 6 7 8
222  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
223  f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
224Subject length lower bound = 3
225
226/\h/I
227Capture group count = 0
228Starting code units: \x09 \x20 \xa0
229Subject length lower bound = 1
230
231/\H/I
232Capture group count = 0
233Subject length lower bound = 1
234
235/\v/I
236Capture group count = 0
237Starting code units: \x0a \x0b \x0c \x0d \x85
238Subject length lower bound = 1
239
240/\V/I
241Capture group count = 0
242Subject length lower bound = 1
243
244/\R/I
245Capture group count = 0
246Starting code units: \x0a \x0b \x0c \x0d \x85
247Subject length lower bound = 1
248
249/[\h]/B
250------------------------------------------------------------------
251        Bra
252        [\x09 \xa0]
253        Ket
254        End
255------------------------------------------------------------------
256    >\x09<
257 0: \x09
258
259/[\h]+/B
260------------------------------------------------------------------
261        Bra
262        [\x09 \xa0]++
263        Ket
264        End
265------------------------------------------------------------------
266    >\x09\x20\xa0<
267 0: \x09 \xa0
268
269/[\v]/B
270------------------------------------------------------------------
271        Bra
272        [\x0a-\x0d\x85]
273        Ket
274        End
275------------------------------------------------------------------
276
277/[\H]/B
278------------------------------------------------------------------
279        Bra
280        [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff]
281        Ket
282        End
283------------------------------------------------------------------
284
285/[^\h]/B
286------------------------------------------------------------------
287        Bra
288        [\x00-\x08\x0a-\x1f!-\x9f\xa1-\xff] (neg)
289        Ket
290        End
291------------------------------------------------------------------
292
293/[\V]/B
294------------------------------------------------------------------
295        Bra
296        [\x00-\x09\x0e-\x84\x86-\xff]
297        Ket
298        End
299------------------------------------------------------------------
300
301/[\x0a\V]/B
302------------------------------------------------------------------
303        Bra
304        [\x00-\x0a\x0e-\x84\x86-\xff]
305        Ket
306        End
307------------------------------------------------------------------
308
309/\777/I
310Failed: error 151 at offset 4: octal value is greater than \377 in 8-bit non-UTF-8 mode
311
312/(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark
313Failed: error 176 at offset 259: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
314    XX
315
316/(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark,alt_verbnames
317Failed: error 176 at offset 259: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
318    XX
319
320/(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark
321    XX
322 0: XX
323MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
324
325/(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark,alt_verbnames
326    XX
327 0: XX
328MK: 0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
329
330/\u0100/alt_bsux,allow_empty_class,match_unset_backref,dupnames
331Failed: error 177 at offset 6: character code point value in \u.... sequence is too large
332
333/[\u0100-\u0200]/alt_bsux,allow_empty_class,match_unset_backref,dupnames
334Failed: error 177 at offset 7: character code point value in \u.... sequence is too large
335
336/[^\x00-a]{12,}[^b-\xff]*/B
337------------------------------------------------------------------
338        Bra
339        [b-\xff] (neg){12,}+
340        [\x00-a] (neg)*+
341        Ket
342        End
343------------------------------------------------------------------
344
345/[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/B
346------------------------------------------------------------------
347        Bra
348        [\x00-\x08\x0e-\x1f!-\xff] (neg)*+
349        \s*
350
351        [0-9A-Z_a-z]++
352        \W+
353
354        [\x00-/:-\xff] (neg)*+
355        \d
356        0
357        [\x00-/:-@[-^`{-\xff] (neg){4,6}+
358        \w*
359        A
360        Ket
361        End
362------------------------------------------------------------------
363
364/(*MARK:a\x{100}b)z/alt_verbnames
365Failed: error 134 at offset 14: character code point value in \x{} or \o{} is too large
366
367/(*:*++++++++++++''''''''''''''''''''+''+++'+++x+++++++++++++++++++++++++++++++++++(++++++++++++++++++++:++++++%++:''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++k+++++++''''+++'+++++++++++++++++++++++''''++++++++++++':ƿ)/
368Failed: error 176 at offset 259: name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)
369
370# End of testinput9
371