testoutput15 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. /-- This set of tests is for UTF-8 support but not Unicode property support,
  2. and is relevant only to the 8-bit library. --/
  3. < forbid W
  4. /X(\C{3})/8
  5. X\x{1234}
  6. 0: X\x{1234}
  7. 1: \x{1234}
  8. /X(\C{4})/8
  9. X\x{1234}YZ
  10. 0: X\x{1234}Y
  11. 1: \x{1234}Y
  12. /X\C*/8
  13. XYZabcdce
  14. 0: XYZabcdce
  15. /X\C*?/8
  16. XYZabcde
  17. 0: X
  18. /X\C{3,5}/8
  19. Xabcdefg
  20. 0: Xabcde
  21. X\x{1234}
  22. 0: X\x{1234}
  23. X\x{1234}YZ
  24. 0: X\x{1234}YZ
  25. X\x{1234}\x{512}
  26. 0: X\x{1234}\x{512}
  27. X\x{1234}\x{512}YZ
  28. 0: X\x{1234}\x{512}
  29. /X\C{3,5}?/8
  30. Xabcdefg
  31. 0: Xabc
  32. X\x{1234}
  33. 0: X\x{1234}
  34. X\x{1234}YZ
  35. 0: X\x{1234}
  36. X\x{1234}\x{512}
  37. 0: X\x{1234}
  38. /a\Cb/8
  39. aXb
  40. 0: aXb
  41. a\nb
  42. 0: a\x{0a}b
  43. /a\C\Cb/8
  44. a\x{100}b
  45. 0: a\x{100}b
  46. /ab\Cde/8
  47. abXde
  48. 0: abXde
  49. /a\C\Cb/8
  50. a\x{100}b
  51. 0: a\x{100}b
  52. ** Failers
  53. No match
  54. a\x{12257}b
  55. No match
  56. /[Ã]/8
  57. Failed: invalid UTF-8 string at offset 1
  58. /Ã/8
  59. Failed: invalid UTF-8 string at offset 0
  60. /ÃÃÃxxx/8
  61. Failed: invalid UTF-8 string at offset 0
  62. /ÃÃÃxxx/8?DZSSO
  63. ------------------------------------------------------------------
  64. Bra
  65. \X{c0}\X{c0}\X{c0}xxx
  66. Ket
  67. End
  68. ------------------------------------------------------------------
  69. Capturing subpattern count = 0
  70. Options: no_auto_possessify utf no_utf_check
  71. First char = \x{c3}
  72. Need char = 'x'
  73. /badutf/8
  74. \xdf
  75. Error -10 (bad UTF-8 string) offset=0 reason=1
  76. \xef
  77. Error -10 (bad UTF-8 string) offset=0 reason=2
  78. \xef\x80
  79. Error -10 (bad UTF-8 string) offset=0 reason=1
  80. \xf7
  81. Error -10 (bad UTF-8 string) offset=0 reason=3
  82. \xf7\x80
  83. Error -10 (bad UTF-8 string) offset=0 reason=2
  84. \xf7\x80\x80
  85. Error -10 (bad UTF-8 string) offset=0 reason=1
  86. \xfb
  87. Error -10 (bad UTF-8 string) offset=0 reason=4
  88. \xfb\x80
  89. Error -10 (bad UTF-8 string) offset=0 reason=3
  90. \xfb\x80\x80
  91. Error -10 (bad UTF-8 string) offset=0 reason=2
  92. \xfb\x80\x80\x80
  93. Error -10 (bad UTF-8 string) offset=0 reason=1
  94. \xfd
  95. Error -10 (bad UTF-8 string) offset=0 reason=5
  96. \xfd\x80
  97. Error -10 (bad UTF-8 string) offset=0 reason=4
  98. \xfd\x80\x80
  99. Error -10 (bad UTF-8 string) offset=0 reason=3
  100. \xfd\x80\x80\x80
  101. Error -10 (bad UTF-8 string) offset=0 reason=2
  102. \xfd\x80\x80\x80\x80
  103. Error -10 (bad UTF-8 string) offset=0 reason=1
  104. \xdf\x7f
  105. Error -10 (bad UTF-8 string) offset=0 reason=6
  106. \xef\x7f\x80
  107. Error -10 (bad UTF-8 string) offset=0 reason=6
  108. \xef\x80\x7f
  109. Error -10 (bad UTF-8 string) offset=0 reason=7
  110. \xf7\x7f\x80\x80
  111. Error -10 (bad UTF-8 string) offset=0 reason=6
  112. \xf7\x80\x7f\x80
  113. Error -10 (bad UTF-8 string) offset=0 reason=7
  114. \xf7\x80\x80\x7f
  115. Error -10 (bad UTF-8 string) offset=0 reason=8
  116. \xfb\x7f\x80\x80\x80
  117. Error -10 (bad UTF-8 string) offset=0 reason=6
  118. \xfb\x80\x7f\x80\x80
  119. Error -10 (bad UTF-8 string) offset=0 reason=7
  120. \xfb\x80\x80\x7f\x80
  121. Error -10 (bad UTF-8 string) offset=0 reason=8
  122. \xfb\x80\x80\x80\x7f
  123. Error -10 (bad UTF-8 string) offset=0 reason=9
  124. \xfd\x7f\x80\x80\x80\x80
  125. Error -10 (bad UTF-8 string) offset=0 reason=6
  126. \xfd\x80\x7f\x80\x80\x80
  127. Error -10 (bad UTF-8 string) offset=0 reason=7
  128. \xfd\x80\x80\x7f\x80\x80
  129. Error -10 (bad UTF-8 string) offset=0 reason=8
  130. \xfd\x80\x80\x80\x7f\x80
  131. Error -10 (bad UTF-8 string) offset=0 reason=9
  132. \xfd\x80\x80\x80\x80\x7f
  133. Error -10 (bad UTF-8 string) offset=0 reason=10
  134. \xed\xa0\x80
  135. Error -10 (bad UTF-8 string) offset=0 reason=14
  136. \xc0\x8f
  137. Error -10 (bad UTF-8 string) offset=0 reason=15
  138. \xe0\x80\x8f
  139. Error -10 (bad UTF-8 string) offset=0 reason=16
  140. \xf0\x80\x80\x8f
  141. Error -10 (bad UTF-8 string) offset=0 reason=17
  142. \xf8\x80\x80\x80\x8f
  143. Error -10 (bad UTF-8 string) offset=0 reason=18
  144. \xfc\x80\x80\x80\x80\x8f
  145. Error -10 (bad UTF-8 string) offset=0 reason=19
  146. \x80
  147. Error -10 (bad UTF-8 string) offset=0 reason=20
  148. \xfe
  149. Error -10 (bad UTF-8 string) offset=0 reason=21
  150. \xff
  151. Error -10 (bad UTF-8 string) offset=0 reason=21
  152. /badutf/8
  153. \xfb\x80\x80\x80\x80
  154. Error -10 (bad UTF-8 string) offset=0 reason=11
  155. \xfd\x80\x80\x80\x80\x80
  156. Error -10 (bad UTF-8 string) offset=0 reason=12
  157. \xf7\xbf\xbf\xbf
  158. Error -10 (bad UTF-8 string) offset=0 reason=13
  159. /shortutf/8
  160. \P\P\xdf
  161. Error -25 (short UTF-8 string) offset=0 reason=1
  162. \P\P\xef
  163. Error -25 (short UTF-8 string) offset=0 reason=2
  164. \P\P\xef\x80
  165. Error -25 (short UTF-8 string) offset=0 reason=1
  166. \P\P\xf7
  167. Error -25 (short UTF-8 string) offset=0 reason=3
  168. \P\P\xf7\x80
  169. Error -25 (short UTF-8 string) offset=0 reason=2
  170. \P\P\xf7\x80\x80
  171. Error -25 (short UTF-8 string) offset=0 reason=1
  172. \P\P\xfb
  173. Error -25 (short UTF-8 string) offset=0 reason=4
  174. \P\P\xfb\x80
  175. Error -25 (short UTF-8 string) offset=0 reason=3
  176. \P\P\xfb\x80\x80
  177. Error -25 (short UTF-8 string) offset=0 reason=2
  178. \P\P\xfb\x80\x80\x80
  179. Error -25 (short UTF-8 string) offset=0 reason=1
  180. \P\P\xfd
  181. Error -25 (short UTF-8 string) offset=0 reason=5
  182. \P\P\xfd\x80
  183. Error -25 (short UTF-8 string) offset=0 reason=4
  184. \P\P\xfd\x80\x80
  185. Error -25 (short UTF-8 string) offset=0 reason=3
  186. \P\P\xfd\x80\x80\x80
  187. Error -25 (short UTF-8 string) offset=0 reason=2
  188. \P\P\xfd\x80\x80\x80\x80
  189. Error -25 (short UTF-8 string) offset=0 reason=1
  190. /anything/8
  191. \xc0\x80
  192. Error -10 (bad UTF-8 string) offset=0 reason=15
  193. \xc1\x8f
  194. Error -10 (bad UTF-8 string) offset=0 reason=15
  195. \xe0\x9f\x80
  196. Error -10 (bad UTF-8 string) offset=0 reason=16
  197. \xf0\x8f\x80\x80
  198. Error -10 (bad UTF-8 string) offset=0 reason=17
  199. \xf8\x87\x80\x80\x80
  200. Error -10 (bad UTF-8 string) offset=0 reason=18
  201. \xfc\x83\x80\x80\x80\x80
  202. Error -10 (bad UTF-8 string) offset=0 reason=19
  203. \xfe\x80\x80\x80\x80\x80
  204. Error -10 (bad UTF-8 string) offset=0 reason=21
  205. \xff\x80\x80\x80\x80\x80
  206. Error -10 (bad UTF-8 string) offset=0 reason=21
  207. \xc3\x8f
  208. No match
  209. \xe0\xaf\x80
  210. No match
  211. \xe1\x80\x80
  212. No match
  213. \xf0\x9f\x80\x80
  214. No match
  215. \xf1\x8f\x80\x80
  216. No match
  217. \xf8\x88\x80\x80\x80
  218. Error -10 (bad UTF-8 string) offset=0 reason=11
  219. \xf9\x87\x80\x80\x80
  220. Error -10 (bad UTF-8 string) offset=0 reason=11
  221. \xfc\x84\x80\x80\x80\x80
  222. Error -10 (bad UTF-8 string) offset=0 reason=12
  223. \xfd\x83\x80\x80\x80\x80
  224. Error -10 (bad UTF-8 string) offset=0 reason=12
  225. \?\xf8\x88\x80\x80\x80
  226. No match
  227. \?\xf9\x87\x80\x80\x80
  228. No match
  229. \?\xfc\x84\x80\x80\x80\x80
  230. No match
  231. \?\xfd\x83\x80\x80\x80\x80
  232. No match
  233. /\x{100}/8DZ
  234. ------------------------------------------------------------------
  235. Bra
  236. \x{100}
  237. Ket
  238. End
  239. ------------------------------------------------------------------
  240. Capturing subpattern count = 0
  241. Options: utf
  242. First char = \x{c4}
  243. Need char = \x{80}
  244. /\x{1000}/8DZ
  245. ------------------------------------------------------------------
  246. Bra
  247. \x{1000}
  248. Ket
  249. End
  250. ------------------------------------------------------------------
  251. Capturing subpattern count = 0
  252. Options: utf
  253. First char = \x{e1}
  254. Need char = \x{80}
  255. /\x{10000}/8DZ
  256. ------------------------------------------------------------------
  257. Bra
  258. \x{10000}
  259. Ket
  260. End
  261. ------------------------------------------------------------------
  262. Capturing subpattern count = 0
  263. Options: utf
  264. First char = \x{f0}
  265. Need char = \x{80}
  266. /\x{100000}/8DZ
  267. ------------------------------------------------------------------
  268. Bra
  269. \x{100000}
  270. Ket
  271. End
  272. ------------------------------------------------------------------
  273. Capturing subpattern count = 0
  274. Options: utf
  275. First char = \x{f4}
  276. Need char = \x{80}
  277. /\x{10ffff}/8DZ
  278. ------------------------------------------------------------------
  279. Bra
  280. \x{10ffff}
  281. Ket
  282. End
  283. ------------------------------------------------------------------
  284. Capturing subpattern count = 0
  285. Options: utf
  286. First char = \x{f4}
  287. Need char = \x{bf}
  288. /[\x{ff}]/8DZ
  289. ------------------------------------------------------------------
  290. Bra
  291. \x{ff}
  292. Ket
  293. End
  294. ------------------------------------------------------------------
  295. Capturing subpattern count = 0
  296. Options: utf
  297. First char = \x{c3}
  298. Need char = \x{bf}
  299. /[\x{100}]/8DZ
  300. ------------------------------------------------------------------
  301. Bra
  302. \x{100}
  303. Ket
  304. End
  305. ------------------------------------------------------------------
  306. Capturing subpattern count = 0
  307. Options: utf
  308. First char = \x{c4}
  309. Need char = \x{80}
  310. /\x80/8DZ
  311. ------------------------------------------------------------------
  312. Bra
  313. \x{80}
  314. Ket
  315. End
  316. ------------------------------------------------------------------
  317. Capturing subpattern count = 0
  318. Options: utf
  319. First char = \x{c2}
  320. Need char = \x{80}
  321. /\xff/8DZ
  322. ------------------------------------------------------------------
  323. Bra
  324. \x{ff}
  325. Ket
  326. End
  327. ------------------------------------------------------------------
  328. Capturing subpattern count = 0
  329. Options: utf
  330. First char = \x{c3}
  331. Need char = \x{bf}
  332. /\x{D55c}\x{ad6d}\x{C5B4}/DZ8
  333. ------------------------------------------------------------------
  334. Bra
  335. \x{d55c}\x{ad6d}\x{c5b4}
  336. Ket
  337. End
  338. ------------------------------------------------------------------
  339. Capturing subpattern count = 0
  340. Options: utf
  341. First char = \x{ed}
  342. Need char = \x{b4}
  343. \x{D55c}\x{ad6d}\x{C5B4}
  344. 0: \x{d55c}\x{ad6d}\x{c5b4}
  345. /\x{65e5}\x{672c}\x{8a9e}/DZ8
  346. ------------------------------------------------------------------
  347. Bra
  348. \x{65e5}\x{672c}\x{8a9e}
  349. Ket
  350. End
  351. ------------------------------------------------------------------
  352. Capturing subpattern count = 0
  353. Options: utf
  354. First char = \x{e6}
  355. Need char = \x{9e}
  356. \x{65e5}\x{672c}\x{8a9e}
  357. 0: \x{65e5}\x{672c}\x{8a9e}
  358. /\x{80}/DZ8
  359. ------------------------------------------------------------------
  360. Bra
  361. \x{80}
  362. Ket
  363. End
  364. ------------------------------------------------------------------
  365. Capturing subpattern count = 0
  366. Options: utf
  367. First char = \x{c2}
  368. Need char = \x{80}
  369. /\x{084}/DZ8
  370. ------------------------------------------------------------------
  371. Bra
  372. \x{84}
  373. Ket
  374. End
  375. ------------------------------------------------------------------
  376. Capturing subpattern count = 0
  377. Options: utf
  378. First char = \x{c2}
  379. Need char = \x{84}
  380. /\x{104}/DZ8
  381. ------------------------------------------------------------------
  382. Bra
  383. \x{104}
  384. Ket
  385. End
  386. ------------------------------------------------------------------
  387. Capturing subpattern count = 0
  388. Options: utf
  389. First char = \x{c4}
  390. Need char = \x{84}
  391. /\x{861}/DZ8
  392. ------------------------------------------------------------------
  393. Bra
  394. \x{861}
  395. Ket
  396. End
  397. ------------------------------------------------------------------
  398. Capturing subpattern count = 0
  399. Options: utf
  400. First char = \x{e0}
  401. Need char = \x{a1}
  402. /\x{212ab}/DZ8
  403. ------------------------------------------------------------------
  404. Bra
  405. \x{212ab}
  406. Ket
  407. End
  408. ------------------------------------------------------------------
  409. Capturing subpattern count = 0
  410. Options: utf
  411. First char = \x{f0}
  412. Need char = \x{ab}
  413. /-- This one is here not because it's different to Perl, but because the way
  414. the captured single-byte is displayed. (In Perl it becomes a character, and you
  415. can't tell the difference.) --/
  416. /X(\C)(.*)/8
  417. X\x{1234}
  418. 0: X\x{1234}
  419. 1: \x{e1}
  420. 2: \x{88}\x{b4}
  421. X\nabc
  422. 0: X\x{0a}abc
  423. 1: \x{0a}
  424. 2: abc
  425. /-- This one is here because Perl gives out a grumbly error message (quite
  426. correctly, but that messes up comparisons). --/
  427. /a\Cb/8
  428. *** Failers
  429. No match
  430. a\x{100}b
  431. No match
  432. /[^ab\xC0-\xF0]/8SDZ
  433. ------------------------------------------------------------------
  434. Bra
  435. [\x00-`c-\xbf\xf1-\xff] (neg)
  436. Ket
  437. End
  438. ------------------------------------------------------------------
  439. Capturing subpattern count = 0
  440. Options: utf
  441. No first char
  442. No need char
  443. Subject length lower bound = 1
  444. Starting chars: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x09 \x0a
  445. \x0b \x0c \x0d \x0e \x0f \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19
  446. \x1a \x1b \x1c \x1d \x1e \x1f \x20 ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4
  447. 5 6 7 8 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
  448. Z [ \ ] ^ _ ` c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f
  449. \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0
  450. \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf
  451. \xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee
  452. \xef \xf0 \xf1 \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd
  453. \xfe \xff
  454. \x{f1}
  455. 0: \x{f1}
  456. \x{bf}
  457. 0: \x{bf}
  458. \x{100}
  459. 0: \x{100}
  460. \x{1000}
  461. 0: \x{1000}
  462. *** Failers
  463. 0: *
  464. \x{c0}
  465. No match
  466. \x{f0}
  467. No match
  468. /Ä€{3,4}/8SDZ
  469. ------------------------------------------------------------------
  470. Bra
  471. \x{100}{3}
  472. \x{100}?+
  473. Ket
  474. End
  475. ------------------------------------------------------------------
  476. Capturing subpattern count = 0
  477. Options: utf
  478. First char = \x{c4}
  479. Need char = \x{80}
  480. Subject length lower bound = 3
  481. No starting char list
  482. \x{100}\x{100}\x{100}\x{100\x{100}
  483. 0: \x{100}\x{100}\x{100}
  484. /(\x{100}+|x)/8SDZ
  485. ------------------------------------------------------------------
  486. Bra
  487. CBra 1
  488. \x{100}++
  489. Alt
  490. x
  491. Ket
  492. Ket
  493. End
  494. ------------------------------------------------------------------
  495. Capturing subpattern count = 1
  496. Options: utf
  497. No first char
  498. No need char
  499. Subject length lower bound = 1
  500. Starting chars: x \xc4
  501. /(\x{100}*a|x)/8SDZ
  502. ------------------------------------------------------------------
  503. Bra
  504. CBra 1
  505. \x{100}*+
  506. a
  507. Alt
  508. x
  509. Ket
  510. Ket
  511. End
  512. ------------------------------------------------------------------
  513. Capturing subpattern count = 1
  514. Options: utf
  515. No first char
  516. No need char
  517. Subject length lower bound = 1
  518. Starting chars: a x \xc4
  519. /(\x{100}{0,2}a|x)/8SDZ
  520. ------------------------------------------------------------------
  521. Bra
  522. CBra 1
  523. \x{100}{0,2}+
  524. a
  525. Alt
  526. x
  527. Ket
  528. Ket
  529. End
  530. ------------------------------------------------------------------
  531. Capturing subpattern count = 1
  532. Options: utf
  533. No first char
  534. No need char
  535. Subject length lower bound = 1
  536. Starting chars: a x \xc4
  537. /(\x{100}{1,2}a|x)/8SDZ
  538. ------------------------------------------------------------------
  539. Bra
  540. CBra 1
  541. \x{100}
  542. \x{100}{0,1}+
  543. a
  544. Alt
  545. x
  546. Ket
  547. Ket
  548. End
  549. ------------------------------------------------------------------
  550. Capturing subpattern count = 1
  551. Options: utf
  552. No first char
  553. No need char
  554. Subject length lower bound = 1
  555. Starting chars: x \xc4
  556. /\x{100}/8DZ
  557. ------------------------------------------------------------------
  558. Bra
  559. \x{100}
  560. Ket
  561. End
  562. ------------------------------------------------------------------
  563. Capturing subpattern count = 0
  564. Options: utf
  565. First char = \x{c4}
  566. Need char = \x{80}
  567. /a\x{100}\x{101}*/8DZ
  568. ------------------------------------------------------------------
  569. Bra
  570. a\x{100}
  571. \x{101}*+
  572. Ket
  573. End
  574. ------------------------------------------------------------------
  575. Capturing subpattern count = 0
  576. Options: utf
  577. First char = 'a'
  578. Need char = \x{80}
  579. /a\x{100}\x{101}+/8DZ
  580. ------------------------------------------------------------------
  581. Bra
  582. a\x{100}
  583. \x{101}++
  584. Ket
  585. End
  586. ------------------------------------------------------------------
  587. Capturing subpattern count = 0
  588. Options: utf
  589. First char = 'a'
  590. Need char = \x{81}
  591. /[^\x{c4}]/DZ
  592. ------------------------------------------------------------------
  593. Bra
  594. [^\x{c4}]
  595. Ket
  596. End
  597. ------------------------------------------------------------------
  598. Capturing subpattern count = 0
  599. No options
  600. No first char
  601. No need char
  602. /[\x{100}]/8DZ
  603. ------------------------------------------------------------------
  604. Bra
  605. \x{100}
  606. Ket
  607. End
  608. ------------------------------------------------------------------
  609. Capturing subpattern count = 0
  610. Options: utf
  611. First char = \x{c4}
  612. Need char = \x{80}
  613. \x{100}
  614. 0: \x{100}
  615. Z\x{100}
  616. 0: \x{100}
  617. \x{100}Z
  618. 0: \x{100}
  619. *** Failers
  620. No match
  621. /[\xff]/DZ8
  622. ------------------------------------------------------------------
  623. Bra
  624. \x{ff}
  625. Ket
  626. End
  627. ------------------------------------------------------------------
  628. Capturing subpattern count = 0
  629. Options: utf
  630. First char = \x{c3}
  631. Need char = \x{bf}
  632. >\x{ff}<
  633. 0: \x{ff}
  634. /[^\xff]/8DZ
  635. ------------------------------------------------------------------
  636. Bra
  637. [^\x{ff}]
  638. Ket
  639. End
  640. ------------------------------------------------------------------
  641. Capturing subpattern count = 0
  642. Options: utf
  643. No first char
  644. No need char
  645. /\x{100}abc(xyz(?1))/8DZ
  646. ------------------------------------------------------------------
  647. Bra
  648. \x{100}abc
  649. CBra 1
  650. xyz
  651. Recurse
  652. Ket
  653. Ket
  654. End
  655. ------------------------------------------------------------------
  656. Capturing subpattern count = 1
  657. Options: utf
  658. First char = \x{c4}
  659. Need char = 'z'
  660. /a\x{1234}b/P8
  661. a\x{1234}b
  662. 0: a\x{1234}b
  663. /\777/8I
  664. Capturing subpattern count = 0
  665. Options: utf
  666. First char = \x{c7}
  667. Need char = \x{bf}
  668. \x{1ff}
  669. 0: \x{1ff}
  670. \777
  671. 0: \x{1ff}
  672. /\x{100}+\x{200}/8DZ
  673. ------------------------------------------------------------------
  674. Bra
  675. \x{100}++
  676. \x{200}
  677. Ket
  678. End
  679. ------------------------------------------------------------------
  680. Capturing subpattern count = 0
  681. Options: utf
  682. First char = \x{c4}
  683. Need char = \x{80}
  684. /\x{100}+X/8DZ
  685. ------------------------------------------------------------------
  686. Bra
  687. \x{100}++
  688. X
  689. Ket
  690. End
  691. ------------------------------------------------------------------
  692. Capturing subpattern count = 0
  693. Options: utf
  694. First char = \x{c4}
  695. Need char = 'X'
  696. /^[\QĀ\E-\Q�\E/BZ8
  697. Failed: missing terminating ] for character class at offset 15
  698. /-- This tests the stricter UTF-8 check according to RFC 3629. --/
  699. /X/8
  700. \x{d800}
  701. Error -10 (bad UTF-8 string) offset=0 reason=14
  702. \x{d800}\?
  703. No match
  704. \x{da00}
  705. Error -10 (bad UTF-8 string) offset=0 reason=14
  706. \x{da00}\?
  707. No match
  708. \x{dfff}
  709. Error -10 (bad UTF-8 string) offset=0 reason=14
  710. \x{dfff}\?
  711. No match
  712. \x{110000}
  713. Error -10 (bad UTF-8 string) offset=0 reason=13
  714. \x{110000}\?
  715. No match
  716. \x{2000000}
  717. Error -10 (bad UTF-8 string) offset=0 reason=11
  718. \x{2000000}\?
  719. No match
  720. \x{7fffffff}
  721. Error -10 (bad UTF-8 string) offset=0 reason=12
  722. \x{7fffffff}\?
  723. No match
  724. /(*UTF8)\x{1234}/
  725. abcd\x{1234}pqr
  726. 0: \x{1234}
  727. /(*CRLF)(*UTF)(*BSR_UNICODE)a\Rb/I
  728. Capturing subpattern count = 0
  729. Options: bsr_unicode utf
  730. Forced newline sequence: CRLF
  731. First char = 'a'
  732. Need char = 'b'
  733. /\h/SI8
  734. Capturing subpattern count = 0
  735. Options: utf
  736. No first char
  737. No need char
  738. Subject length lower bound = 1
  739. Starting chars: \x09 \x20 \xc2 \xe1 \xe2 \xe3
  740. ABC\x{09}
  741. 0: \x{09}
  742. ABC\x{20}
  743. 0:
  744. ABC\x{a0}
  745. 0: \x{a0}
  746. ABC\x{1680}
  747. 0: \x{1680}
  748. ABC\x{180e}
  749. 0: \x{180e}
  750. ABC\x{2000}
  751. 0: \x{2000}
  752. ABC\x{202f}
  753. 0: \x{202f}
  754. ABC\x{205f}
  755. 0: \x{205f}
  756. ABC\x{3000}
  757. 0: \x{3000}
  758. /\v/SI8
  759. Capturing subpattern count = 0
  760. Options: utf
  761. No first char
  762. No need char
  763. Subject length lower bound = 1
  764. Starting chars: \x0a \x0b \x0c \x0d \xc2 \xe2
  765. ABC\x{0a}
  766. 0: \x{0a}
  767. ABC\x{0b}
  768. 0: \x{0b}
  769. ABC\x{0c}
  770. 0: \x{0c}
  771. ABC\x{0d}
  772. 0: \x{0d}
  773. ABC\x{85}
  774. 0: \x{85}
  775. ABC\x{2028}
  776. 0: \x{2028}
  777. /\h*A/SI8
  778. Capturing subpattern count = 0
  779. Options: utf
  780. No first char
  781. Need char = 'A'
  782. Subject length lower bound = 1
  783. Starting chars: \x09 \x20 A \xc2 \xe1 \xe2 \xe3
  784. CDBABC
  785. 0: A
  786. /\v+A/SI8
  787. Capturing subpattern count = 0
  788. Options: utf
  789. No first char
  790. Need char = 'A'
  791. Subject length lower bound = 2
  792. Starting chars: \x0a \x0b \x0c \x0d \xc2 \xe2
  793. /\s?xxx\s/8SI
  794. Capturing subpattern count = 0
  795. Options: utf
  796. No first char
  797. Need char = 'x'
  798. Subject length lower bound = 4
  799. Starting chars: \x09 \x0a \x0b \x0c \x0d \x20 x
  800. /\sxxx\s/I8ST1
  801. Capturing subpattern count = 0
  802. Options: utf
  803. No first char
  804. Need char = 'x'
  805. Subject length lower bound = 5
  806. Starting chars: \x09 \x0a \x0b \x0c \x0d \x20 \xc2
  807. AB\x{85}xxx\x{a0}XYZ
  808. 0: \x{85}xxx\x{a0}
  809. AB\x{a0}xxx\x{85}XYZ
  810. 0: \x{a0}xxx\x{85}
  811. /\S \S/I8ST1
  812. Capturing subpattern count = 0
  813. Options: utf
  814. No first char
  815. Need char = ' '
  816. Subject length lower bound = 3
  817. Starting chars: \x00 \x01 \x02 \x03 \x04 \x05 \x06 \x07 \x08 \x0e \x0f
  818. \x10 \x11 \x12 \x13 \x14 \x15 \x16 \x17 \x18 \x19 \x1a \x1b \x1c \x1d \x1e
  819. \x1f ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C
  820. 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 f g h
  821. i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xc0 \xc1 \xc2 \xc3 \xc4
  822. \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf \xd0 \xd1 \xd2 \xd3
  823. \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \xe0 \xe1 \xe2
  824. \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \xf0 \xf1
  825. \xf2 \xf3 \xf4 \xf5 \xf6 \xf7 \xf8 \xf9 \xfa \xfb \xfc \xfd \xfe \xff
  826. \x{a2} \x{84}
  827. 0: \x{a2} \x{84}
  828. A Z
  829. 0: A Z
  830. /a+/8
  831. a\x{123}aa\>1
  832. 0: aa
  833. a\x{123}aa\>2
  834. Error -11 (bad UTF-8 offset)
  835. a\x{123}aa\>3
  836. 0: aa
  837. a\x{123}aa\>4
  838. 0: a
  839. a\x{123}aa\>5
  840. No match
  841. a\x{123}aa\>6
  842. Error -24 (bad offset value)
  843. /\x{1234}+/iS8I
  844. Capturing subpattern count = 0
  845. Options: caseless utf
  846. No first char
  847. No need char
  848. Subject length lower bound = 1
  849. Starting chars: \xe1
  850. /\x{1234}+?/iS8I
  851. Capturing subpattern count = 0
  852. Options: caseless utf
  853. No first char
  854. No need char
  855. Subject length lower bound = 1
  856. Starting chars: \xe1
  857. /\x{1234}++/iS8I
  858. Capturing subpattern count = 0
  859. Options: caseless utf
  860. No first char
  861. No need char
  862. Subject length lower bound = 1
  863. Starting chars: \xe1
  864. /\x{1234}{2}/iS8I
  865. Capturing subpattern count = 0
  866. Options: caseless utf
  867. No first char
  868. No need char
  869. Subject length lower bound = 2
  870. Starting chars: \xe1
  871. /[^\x{c4}]/8DZ
  872. ------------------------------------------------------------------
  873. Bra
  874. [^\x{c4}]
  875. Ket
  876. End
  877. ------------------------------------------------------------------
  878. Capturing subpattern count = 0
  879. Options: utf
  880. No first char
  881. No need char
  882. /X+\x{200}/8DZ
  883. ------------------------------------------------------------------
  884. Bra
  885. X++
  886. \x{200}
  887. Ket
  888. End
  889. ------------------------------------------------------------------
  890. Capturing subpattern count = 0
  891. Options: utf
  892. First char = 'X'
  893. Need char = \x{80}
  894. /\R/SI8
  895. Capturing subpattern count = 0
  896. Options: utf
  897. No first char
  898. No need char
  899. Subject length lower bound = 1
  900. Starting chars: \x0a \x0b \x0c \x0d \xc2 \xe2
  901. /\777/8DZ
  902. ------------------------------------------------------------------
  903. Bra
  904. \x{1ff}
  905. Ket
  906. End
  907. ------------------------------------------------------------------
  908. Capturing subpattern count = 0
  909. Options: utf
  910. First char = \x{c7}
  911. Need char = \x{bf}
  912. /\w+\x{C4}/8BZ
  913. ------------------------------------------------------------------
  914. Bra
  915. \w++
  916. \x{c4}
  917. Ket
  918. End
  919. ------------------------------------------------------------------
  920. a\x{C4}\x{C4}
  921. 0: a\x{c4}
  922. /\w+\x{C4}/8BZT1
  923. ------------------------------------------------------------------
  924. Bra
  925. \w+
  926. \x{c4}
  927. Ket
  928. End
  929. ------------------------------------------------------------------
  930. a\x{C4}\x{C4}
  931. 0: a\x{c4}\x{c4}
  932. /\W+\x{C4}/8BZ
  933. ------------------------------------------------------------------
  934. Bra
  935. \W+
  936. \x{c4}
  937. Ket
  938. End
  939. ------------------------------------------------------------------
  940. !\x{C4}
  941. 0: !\x{c4}
  942. /\W+\x{C4}/8BZT1
  943. ------------------------------------------------------------------
  944. Bra
  945. \W++
  946. \x{c4}
  947. Ket
  948. End
  949. ------------------------------------------------------------------
  950. !\x{C4}
  951. 0: !\x{c4}
  952. /\W+\x{A1}/8BZ
  953. ------------------------------------------------------------------
  954. Bra
  955. \W+
  956. \x{a1}
  957. Ket
  958. End
  959. ------------------------------------------------------------------
  960. !\x{A1}
  961. 0: !\x{a1}
  962. /\W+\x{A1}/8BZT1
  963. ------------------------------------------------------------------
  964. Bra
  965. \W+
  966. \x{a1}
  967. Ket
  968. End
  969. ------------------------------------------------------------------
  970. !\x{A1}
  971. 0: !\x{a1}
  972. /X\s+\x{A0}/8BZ
  973. ------------------------------------------------------------------
  974. Bra
  975. X
  976. \s++
  977. \x{a0}
  978. Ket
  979. End
  980. ------------------------------------------------------------------
  981. X\x20\x{A0}\x{A0}
  982. 0: X \x{a0}
  983. /X\s+\x{A0}/8BZT1
  984. ------------------------------------------------------------------
  985. Bra
  986. X
  987. \s+
  988. \x{a0}
  989. Ket
  990. End
  991. ------------------------------------------------------------------
  992. X\x20\x{A0}\x{A0}
  993. 0: X \x{a0}\x{a0}
  994. /\S+\x{A0}/8BZ
  995. ------------------------------------------------------------------
  996. Bra
  997. \S+
  998. \x{a0}
  999. Ket
  1000. End
  1001. ------------------------------------------------------------------
  1002. X\x{A0}\x{A0}
  1003. 0: X\x{a0}\x{a0}
  1004. /\S+\x{A0}/8BZT1
  1005. ------------------------------------------------------------------
  1006. Bra
  1007. \S++
  1008. \x{a0}
  1009. Ket
  1010. End
  1011. ------------------------------------------------------------------
  1012. X\x{A0}\x{A0}
  1013. 0: X\x{a0}
  1014. /\x{a0}+\s!/8BZ
  1015. ------------------------------------------------------------------
  1016. Bra
  1017. \x{a0}++
  1018. \s
  1019. !
  1020. Ket
  1021. End
  1022. ------------------------------------------------------------------
  1023. \x{a0}\x20!
  1024. 0: \x{a0} !
  1025. /\x{a0}+\s!/8BZT1
  1026. ------------------------------------------------------------------
  1027. Bra
  1028. \x{a0}+
  1029. \s
  1030. !
  1031. Ket
  1032. End
  1033. ------------------------------------------------------------------
  1034. \x{a0}\x20!
  1035. 0: \x{a0} !
  1036. /A/8
  1037. \x{ff000041}
  1038. ** Character \x{ff000041} is greater than 0x7fffffff and so cannot be converted to UTF-8
  1039. \x{7f000041}
  1040. Error -10 (bad UTF-8 string) offset=0 reason=12
  1041. /(*UTF8)abc/9
  1042. Failed: setting UTF is disabled by the application at offset 0
  1043. /abc/89
  1044. Failed: setting UTF is disabled by the application at offset 0
  1045. //8+L
  1046. \xf1\xad\xae\xae
  1047. 0:
  1048. 0+ \x{6dbae}
  1049. /-- End of testinput15 --/