| 1 |
|
/-- These tests for Unicode property support test PCRE's API and show some of |
| 2 |
|
the compiled code. They are not Perl-compatible. --/ |
| 3 |
|
|
| 4 |
/[\p{L}]/DZ |
/[\p{L}]/DZ |
| 5 |
|
|
| 6 |
/[\p{^L}]/DZ |
/[\p{^L}]/DZ |
| 131 |
\x{2028} |
\x{2028} |
| 132 |
\x{200d} |
\x{200d} |
| 133 |
|
|
| 134 |
|
/-- These four are here rather than in test 6 because Perl has problems with |
| 135 |
|
the negative versions of the properties. --/ |
| 136 |
|
|
| 137 |
/\p{^Lu}/8i |
/\p{^Lu}/8i |
| 138 |
1234 |
1234 |
| 139 |
** Failers |
** Failers |
| 161 |
\x{c0} |
\x{c0} |
| 162 |
\x{e0} |
\x{e0} |
| 163 |
|
|
| 164 |
/The next two are special cases where the lengths of the different cases of the |
/-- The next two are special cases where the lengths of the different cases of |
| 165 |
same character differ. The first went wrong with heap frame storage; the 2nd |
the same character differ. The first went wrong with heap frame storage; the |
| 166 |
was broken in all cases./ |
second was broken in all cases. --/ |
| 167 |
|
|
| 168 |
/^\x{023a}+?(\x{0130}+)/8i |
/^\x{023a}+?(\x{0130}+)/8i |
| 169 |
\x{023a}\x{2c65}\x{0130} |
\x{023a}\x{2c65}\x{0130} |
| 191 |
\x{c0} |
\x{c0} |
| 192 |
\x{e0} |
\x{e0} |
| 193 |
|
|
| 194 |
/The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE |
/-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE |
| 195 |
will match it only with UCP support, because without that it has no notion |
will match it only with UCP support, because without that it has no notion |
| 196 |
of case for anything other than the ASCII letters. / |
of case for anything other than the ASCII letters. --/ |
| 197 |
|
|
| 198 |
/((?i)[\x{c0}])/8 |
/((?i)[\x{c0}])/8 |
| 199 |
\x{c0} |
\x{c0} |
| 202 |
/(?i:[\x{c0}])/8 |
/(?i:[\x{c0}])/8 |
| 203 |
\x{c0} |
\x{c0} |
| 204 |
\x{e0} |
\x{e0} |
| 205 |
|
|
| 206 |
|
/-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8 |
| 207 |
|
|
| 208 |
|
/^\X/8 |
| 209 |
|
A |
| 210 |
|
A\x{300}BC |
| 211 |
|
A\x{300}\x{301}\x{302}BC |
| 212 |
|
*** Failers |
| 213 |
|
\x{300} |
| 214 |
|
|
| 215 |
|
/-- These are PCRE's extra properties to help with Unicodizing \d etc. --/ |
| 216 |
|
|
| 217 |
|
/^\p{Xan}/8 |
| 218 |
|
ABCD |
| 219 |
|
1234 |
| 220 |
|
\x{6ca} |
| 221 |
|
\x{a6c} |
| 222 |
|
\x{10a7} |
| 223 |
|
** Failers |
| 224 |
|
_ABC |
| 225 |
|
|
| 226 |
|
/^\p{Xan}+/8 |
| 227 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 228 |
|
** Failers |
| 229 |
|
_ABC |
| 230 |
|
|
| 231 |
|
/^\p{Xan}+?/8 |
| 232 |
|
\x{6ca}\x{a6c}\x{10a7}_ |
| 233 |
|
|
| 234 |
|
/^\p{Xan}*/8 |
| 235 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 236 |
|
|
| 237 |
|
/^\p{Xan}{2,9}/8 |
| 238 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 239 |
|
|
| 240 |
|
/^\p{Xan}{2,9}?/8 |
| 241 |
|
\x{6ca}\x{a6c}\x{10a7}_ |
| 242 |
|
|
| 243 |
|
/^[\p{Xan}]/8 |
| 244 |
|
ABCD1234_ |
| 245 |
|
1234abcd_ |
| 246 |
|
\x{6ca} |
| 247 |
|
\x{a6c} |
| 248 |
|
\x{10a7} |
| 249 |
|
** Failers |
| 250 |
|
_ABC |
| 251 |
|
|
| 252 |
|
/^[\p{Xan}]+/8 |
| 253 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 254 |
|
** Failers |
| 255 |
|
_ABC |
| 256 |
|
|
| 257 |
|
/^>\p{Xsp}/8 |
| 258 |
|
>\x{1680}\x{2028}\x{0b} |
| 259 |
|
>\x{a0} |
| 260 |
|
** Failers |
| 261 |
|
\x{0b} |
| 262 |
|
|
| 263 |
|
/^>\p{Xsp}+/8 |
| 264 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 265 |
|
|
| 266 |
|
/^>\p{Xsp}+?/8 |
| 267 |
|
>\x{1680}\x{2028}\x{0b} |
| 268 |
|
|
| 269 |
|
/^>\p{Xsp}*/8 |
| 270 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 271 |
|
|
| 272 |
|
/^>\p{Xsp}{2,9}/8 |
| 273 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 274 |
|
|
| 275 |
|
/^>\p{Xsp}{2,9}?/8 |
| 276 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 277 |
|
|
| 278 |
|
/^>[\p{Xsp}]/8 |
| 279 |
|
>\x{2028}\x{0b} |
| 280 |
|
|
| 281 |
|
/^>[\p{Xsp}]+/8 |
| 282 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 283 |
|
|
| 284 |
|
/^>\p{Xps}/8 |
| 285 |
|
>\x{1680}\x{2028}\x{0b} |
| 286 |
|
>\x{a0} |
| 287 |
|
** Failers |
| 288 |
|
\x{0b} |
| 289 |
|
|
| 290 |
|
/^>\p{Xps}+/8 |
| 291 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 292 |
|
|
| 293 |
|
/^>\p{Xps}+?/8 |
| 294 |
|
>\x{1680}\x{2028}\x{0b} |
| 295 |
|
|
| 296 |
|
/^>\p{Xps}*/8 |
| 297 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 298 |
|
|
| 299 |
|
/^>\p{Xps}{2,9}/8 |
| 300 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 301 |
|
|
| 302 |
|
/^>\p{Xps}{2,9}?/8 |
| 303 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 304 |
|
|
| 305 |
|
/^>[\p{Xps}]/8 |
| 306 |
|
>\x{2028}\x{0b} |
| 307 |
|
|
| 308 |
|
/^>[\p{Xps}]+/8 |
| 309 |
|
> \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b} |
| 310 |
|
|
| 311 |
|
/^\p{Xwd}/8 |
| 312 |
|
ABCD |
| 313 |
|
1234 |
| 314 |
|
\x{6ca} |
| 315 |
|
\x{a6c} |
| 316 |
|
\x{10a7} |
| 317 |
|
_ABC |
| 318 |
|
** Failers |
| 319 |
|
[] |
| 320 |
|
|
| 321 |
|
/^\p{Xwd}+/8 |
| 322 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 323 |
|
|
| 324 |
|
/^\p{Xwd}+?/8 |
| 325 |
|
\x{6ca}\x{a6c}\x{10a7}_ |
| 326 |
|
|
| 327 |
|
/^\p{Xwd}*/8 |
| 328 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 329 |
|
|
| 330 |
|
/^\p{Xwd}{2,9}/8 |
| 331 |
|
A_B12\x{6ca}\x{a6c}\x{10a7} |
| 332 |
|
|
| 333 |
|
/^\p{Xwd}{2,9}?/8 |
| 334 |
|
\x{6ca}\x{a6c}\x{10a7}_ |
| 335 |
|
|
| 336 |
|
/^[\p{Xwd}]/8 |
| 337 |
|
ABCD1234_ |
| 338 |
|
1234abcd_ |
| 339 |
|
\x{6ca} |
| 340 |
|
\x{a6c} |
| 341 |
|
\x{10a7} |
| 342 |
|
_ABC |
| 343 |
|
** Failers |
| 344 |
|
[] |
| 345 |
|
|
| 346 |
|
/^[\p{Xwd}]+/8 |
| 347 |
|
ABCD1234\x{6ca}\x{a6c}\x{10a7}_ |
| 348 |
|
|
| 349 |
|
/-- A check not in UTF-8 mode --/ |
| 350 |
|
|
| 351 |
|
/^[\p{Xwd}]+/ |
| 352 |
|
ABCD1234_ |
| 353 |
|
|
| 354 |
|
/-- Some negative checks --/ |
| 355 |
|
|
| 356 |
|
/^[\P{Xwd}]+/8 |
| 357 |
|
!.+\x{019}\x{35a}AB |
| 358 |
|
|
| 359 |
|
/^[\p{^Xwd}]+/8 |
| 360 |
|
!.+\x{019}\x{35a}AB |
| 361 |
|
|
| 362 |
|
/-- End of testinput12 --/ |