1 
/ This set of tests is for UTF16 support, and is relevant only to the 16bit 
/ This set of tests is run only with the 8bit library when Unicode property 
2 
library. There are some nonUTF 16bit tests as well (it doesn't seem 
support is available. It starts with tests of the POSIX interface, because 
3 
worth setting up another test file just for this case). / 
that is supported only with the 8bit library. / 
4 


5 
/xxx/8?DZSS 
/\w/P 
6 

+++\x{c2} 
7 


8 
/abc/8 
/\w/WP 
9 
] 
+++\x{c2} 




/X(\C{3})/8 


X\x{11234}Y 





/X(\C{4})/8 


X\x{11234}YZ 





/X\C*/8 


XYZabcdce 





/X\C*?/8 


XYZabcde 





/X\C{3,5}/8 


Xabcdefg 


X\x{11234}Y 


X\x{11234}YZ 


X\x{11234}\x{512} 


X\x{11234}\x{512}YZ 


X\x{11234}\x{512}\x{11234}Z 





/X\C{3,5}?/8 


Xabcdefg 


X\x{11234}Y 


X\x{11234}YZ 


X\x{11234}\x{512}YZ 


*** Failers 


X\x{11234} 





/a\Cb/ 


aXb 


a\nb 





/a\Cb/8 


aXb 


a\nb 





/a\C\Cb/8 


a\x{12257}b 


** Failers 


a\x{100}b 





/ab\Cde/8 


abXde 





/ Check maximum nonUTF character size / 





/\x{ffff}/ 





/\x{10000}/ 





/\x{100}/8DZ 





/\x{1000}/8DZ 





/\x{10000}/8DZ 





/\x{100000}/8DZ 





/\x{10ffff}/8DZ 





/[\x{ff}]/8DZ 





/[\x{100}]/8DZ 





/\x80/8DZ 





/\xff/8DZ 





/\x{D55c}\x{ad6d}\x{C5B4}/DZ8 


\x{D55c}\x{ad6d}\x{C5B4} 





/\x{65e5}\x{672c}\x{8a9e}/DZ8 


\x{65e5}\x{672c}\x{8a9e} 





/\x{80}/DZ8 





/\x{084}/DZ8 





/\x{104}/DZ8 





/\x{861}/DZ8 





/\x{212ab}/DZ8 





/ This one is here not because it's different to Perl, but because the way 


the captured singlebyte is displayed. (In Perl it becomes a character, and you 


can't tell the difference.) / 

10 


11 
/X(\C)(.*)/8 
/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8iDZ 

X\x{1234} 


X\nabc 





/ This one is here because Perl gives out a grumbly error message (quite 


correctly, but that messes up comparisons). / 





/a\Cb/8 


*** Failers 


a\x{100}b 





/[^ab\xC0\xF0]/8SDZ 


\x{f1} 


\x{bf} 


\x{100} 


\x{1000} 


*** Failers 


\x{c0} 


\x{f0} 





/Ā{3,4}/8SDZ 


\x{100}\x{100}\x{100}\x{100\x{100} 





/(\x{100}+x)/8SDZ 





/(\x{100}*ax)/8SDZ 





/(\x{100}{0,2}ax)/8SDZ 





/(\x{100}{1,2}ax)/8SDZ 





/\x{100}/8DZ 





/a\x{100}\x{101}*/8DZ 





/a\x{100}\x{101}+/8DZ 





/[^\x{c4}]/DZ 





/[\x{100}]/8DZ 


\x{100} 


Z\x{100} 


\x{100}Z 


*** Failers 





/[\xff]/DZ8 


>\x{ff}< 





/[^\xff]/8DZ 





/\x{100}abc(xyz(?1))/8DZ 





/\777/8I 


\x{1ff} 


\777 





/\x{100}+\x{200}/8DZ 





/\x{100}+X/8DZ 





/^[\QĀ\E\QŐ\E/BZ8 





/ This tests the stricter UTF8 check according to RFC 3629. / 





/X/8 


\x{0}\x{d7ff}\x{e000}\x{10ffff} 


\x{d800} 


\x{d800}\? 


\x{da00} 


\x{da00}\? 


\x{dfff} 


\x{dfff}\? 


\x{110000} 


\x{110000}\? 


\x{2000000} 


\x{2000000}\? 


\x{7fffffff} 


\x{7fffffff}\? 





/(*UTF16)\x{11234}/ 


abcd\x{11234}pqr 





/(*CRLF)(*UTF16)(*BSR_UNICODE)a\Rb/I 





/\h/SI8 


ABC\x{09} 


ABC\x{20} 


ABC\x{a0} 


ABC\x{1680} 


ABC\x{180e} 


ABC\x{2000} 


ABC\x{202f} 


ABC\x{205f} 


ABC\x{3000} 





/\v/SI8 


ABC\x{0a} 


ABC\x{0b} 


ABC\x{0c} 


ABC\x{0d} 


ABC\x{85} 


ABC\x{2028} 





/\h*A/SI8 


CDBABC 





/\v+A/SI8 





/\s?xxx\s/8SI 





/\sxxx\s/I8ST1 


AB\x{85}xxx\x{a0}XYZ 


AB\x{a0}xxx\x{85}XYZ 





/\S \S/I8ST1 


\x{a2} \x{84} 


A Z 





/a+/8 


a\x{123}aa\>1 


a\x{123}aa\>2 


a\x{123}aa\>3 


a\x{123}aa\>4 


a\x{123}aa\>5 


a\x{123}aa\>6 





/\x{1234}+/iS8I 

12 


13 
/\x{1234}+?/iS8I 
/A\x{391}\x{10427}\x{ff3a}\x{1fb0}/8DZ 
14 


15 
/\x{1234}++/iS8I 
/AB\x{1fb0}/8DZ 
16 


17 
/\x{1234}{2}/iS8I 
/AB\x{1fb0}/8DZi 
18 


19 
/[^\x{c4}]/8DZ 
/\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f}/8iSI 
20 

\x{401}\x{420}\x{421}\x{422}\x{423}\x{424}\x{425}\x{426}\x{427}\x{428}\x{429}\x{42a}\x{42b}\x{42c}\x{42d}\x{42e}\x{42f} 
21 

\x{451}\x{440}\x{441}\x{442}\x{443}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}\x{44a}\x{44b}\x{44c}\x{44d}\x{44e}\x{44f} 
22 


23 
/X+\x{200}/8DZ 
/[ⱥ]/8iBZ 
24 


25 
/\R/SI8 
/[^ⱥ]/8iBZ 
26 


27 
/ End of testinput16 / 
/ End of testinput16 / 