Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 1 | # This set of tests is run only with the 8-bit library. They must not require |
| 2 | # UTF-8 or Unicode property support. */ |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 3 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 4 | #forbid_utf |
| 5 | #newline_default lf any anycrlf |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 6 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 7 | /ab/ |
| 8 | \= Expect error message (too big char) and no match |
| 9 | A\x{123}B |
| 10 | A\o{443}B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 11 | |
| 12 | /\x{100}/I |
| 13 | |
| 14 | /\o{400}/I |
| 15 | |
| 16 | / (?: [\040\t] | \( |
| 17 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 18 | \) )* # optional leading comment |
| 19 | (?: (?: |
| 20 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 21 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 22 | | |
| 23 | " (?: # opening quote... |
| 24 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 25 | | # or |
| 26 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 27 | )* " # closing quote |
| 28 | ) # initial word |
| 29 | (?: (?: [\040\t] | \( |
| 30 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 31 | \) )* \. (?: [\040\t] | \( |
| 32 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 33 | \) )* (?: |
| 34 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 35 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 36 | | |
| 37 | " (?: # opening quote... |
| 38 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 39 | | # or |
| 40 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 41 | )* " # closing quote |
| 42 | ) )* # further okay, if led by a period |
| 43 | (?: [\040\t] | \( |
| 44 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 45 | \) )* @ (?: [\040\t] | \( |
| 46 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 47 | \) )* (?: |
| 48 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 49 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 50 | | \[ # [ |
| 51 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 52 | \] # ] |
| 53 | ) # initial subdomain |
| 54 | (?: # |
| 55 | (?: [\040\t] | \( |
| 56 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 57 | \) )* \. # if led by a period... |
| 58 | (?: [\040\t] | \( |
| 59 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 60 | \) )* (?: |
| 61 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 62 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 63 | | \[ # [ |
| 64 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 65 | \] # ] |
| 66 | ) # ...further okay |
| 67 | )* |
| 68 | # address |
| 69 | | # or |
| 70 | (?: |
| 71 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 72 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 73 | | |
| 74 | " (?: # opening quote... |
| 75 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 76 | | # or |
| 77 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 78 | )* " # closing quote |
| 79 | ) # one word, optionally followed by.... |
| 80 | (?: |
| 81 | [^()<>@,;:".\\\[\]\x80-\xff\000-\010\012-\037] | # atom and space parts, or... |
| 82 | \( |
| 83 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 84 | \) | # comments, or... |
| 85 | |
| 86 | " (?: # opening quote... |
| 87 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 88 | | # or |
| 89 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 90 | )* " # closing quote |
| 91 | # quoted strings |
| 92 | )* |
| 93 | < (?: [\040\t] | \( |
| 94 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 95 | \) )* # leading < |
| 96 | (?: @ (?: [\040\t] | \( |
| 97 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 98 | \) )* (?: |
| 99 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 100 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 101 | | \[ # [ |
| 102 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 103 | \] # ] |
| 104 | ) # initial subdomain |
| 105 | (?: # |
| 106 | (?: [\040\t] | \( |
| 107 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 108 | \) )* \. # if led by a period... |
| 109 | (?: [\040\t] | \( |
| 110 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 111 | \) )* (?: |
| 112 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 113 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 114 | | \[ # [ |
| 115 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 116 | \] # ] |
| 117 | ) # ...further okay |
| 118 | )* |
| 119 | |
| 120 | (?: (?: [\040\t] | \( |
| 121 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 122 | \) )* , (?: [\040\t] | \( |
| 123 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 124 | \) )* @ (?: [\040\t] | \( |
| 125 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 126 | \) )* (?: |
| 127 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 128 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 129 | | \[ # [ |
| 130 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 131 | \] # ] |
| 132 | ) # initial subdomain |
| 133 | (?: # |
| 134 | (?: [\040\t] | \( |
| 135 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 136 | \) )* \. # if led by a period... |
| 137 | (?: [\040\t] | \( |
| 138 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 139 | \) )* (?: |
| 140 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 141 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 142 | | \[ # [ |
| 143 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 144 | \] # ] |
| 145 | ) # ...further okay |
| 146 | )* |
| 147 | )* # further okay, if led by comma |
| 148 | : # closing colon |
| 149 | (?: [\040\t] | \( |
| 150 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 151 | \) )* )? # optional route |
| 152 | (?: |
| 153 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 154 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 155 | | |
| 156 | " (?: # opening quote... |
| 157 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 158 | | # or |
| 159 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 160 | )* " # closing quote |
| 161 | ) # initial word |
| 162 | (?: (?: [\040\t] | \( |
| 163 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 164 | \) )* \. (?: [\040\t] | \( |
| 165 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 166 | \) )* (?: |
| 167 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 168 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 169 | | |
| 170 | " (?: # opening quote... |
| 171 | [^\\\x80-\xff\n\015"] # Anything except backslash and quote |
| 172 | | # or |
| 173 | \\ [^\x80-\xff] # Escaped something (something != CR) |
| 174 | )* " # closing quote |
| 175 | ) )* # further okay, if led by a period |
| 176 | (?: [\040\t] | \( |
| 177 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 178 | \) )* @ (?: [\040\t] | \( |
| 179 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 180 | \) )* (?: |
| 181 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 182 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 183 | | \[ # [ |
| 184 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 185 | \] # ] |
| 186 | ) # initial subdomain |
| 187 | (?: # |
| 188 | (?: [\040\t] | \( |
| 189 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 190 | \) )* \. # if led by a period... |
| 191 | (?: [\040\t] | \( |
| 192 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 193 | \) )* (?: |
| 194 | [^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]+ # some number of atom characters... |
| 195 | (?![^(\040)<>@,;:".\\\[\]\000-\037\x80-\xff]) # ..not followed by something that could be part of an atom |
| 196 | | \[ # [ |
| 197 | (?: [^\\\x80-\xff\n\015\[\]] | \\ [^\x80-\xff] )* # stuff |
| 198 | \] # ] |
| 199 | ) # ...further okay |
| 200 | )* |
| 201 | # address spec |
| 202 | (?: [\040\t] | \( |
| 203 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 204 | \) )* > # trailing > |
| 205 | # name and address |
| 206 | ) (?: [\040\t] | \( |
| 207 | (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] | \( (?: [^\\\x80-\xff\n\015()] | \\ [^\x80-\xff] )* \) )* |
| 208 | \) )* # optional trailing comment |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 209 | /Ix |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 210 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 211 | /\h/I |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 212 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 213 | /\H/I |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 214 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 215 | /\v/I |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 216 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 217 | /\V/I |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 218 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 219 | /\R/I |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 220 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 221 | /[\h]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 222 | >\x09< |
| 223 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 224 | /[\h]+/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 225 | >\x09\x20\xa0< |
| 226 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 227 | /[\v]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 228 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 229 | /[\H]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 230 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 231 | /[^\h]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 232 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 233 | /[\V]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 234 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 235 | /[\x0a\V]/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 236 | |
| 237 | /\777/I |
| 238 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 239 | /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 240 | XX |
| 241 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 242 | /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF)XX/mark,alt_verbnames |
| 243 | XX |
| 244 | |
| 245 | /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 246 | XX |
| 247 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 248 | /(*:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDE)XX/mark,alt_verbnames |
| 249 | XX |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 250 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 251 | /\u0100/alt_bsux,allow_empty_class,match_unset_backref,dupnames |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 252 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 253 | /[\u0100-\u0200]/alt_bsux,allow_empty_class,match_unset_backref,dupnames |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 254 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 255 | /[^\x00-a]{12,}[^b-\xff]*/B |
Nick Kralevich | f73ff17 | 2014-09-27 12:41:49 -0700 | [diff] [blame] | 256 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 257 | /[^\s]*\s* [^\W]+\W+ [^\d]*?\d0 [^\d\w]{4,6}?\w*A/B |
Elliott Hughes | 0ea9883 | 2015-12-04 23:18:20 -0800 | [diff] [blame] | 258 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 259 | /(*MARK:a\x{100}b)z/alt_verbnames |
| 260 | |
Elliott Hughes | 9bc971b | 2018-07-27 13:23:14 -0700 | [diff] [blame] | 261 | /(*:*++++++++++++''''''''''''''''''''+''+++'+++x+++++++++++++++++++++++++++++++++++(++++++++++++++++++++:++++++%++:''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++++++++++++++++-++++++++k+++++++''''+++'+++++++++++++++++++++++''''++++++++++++':ƿ)/ |
| 262 | |
Elliott Hughes | 378b175 | 2021-06-08 13:42:40 -0700 | [diff] [blame] | 263 | /(?i:A{1,}\6666666666)/ |
| 264 | A\x{1b6}6666666 |
| 265 | |
Janis Danisevskis | 112c9cc | 2016-03-31 13:35:25 +0100 | [diff] [blame] | 266 | # End of testinput9 |