15759b3d2Safresh1 25759b3d2Safresh1BEGIN { 35759b3d2Safresh1 if ($ENV{PERL_CORE}) { 45759b3d2Safresh1 chdir('t') if -d 't'; 55759b3d2Safresh1 @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib); 65759b3d2Safresh1 } 75759b3d2Safresh1} 85759b3d2Safresh1 95759b3d2Safresh1######################### 105759b3d2Safresh1 115759b3d2Safresh1use strict; 125759b3d2Safresh1use warnings; 135759b3d2Safresh1BEGIN { $| = 1; print "1..217\n"; } 145759b3d2Safresh1my $count = 0; 15*256a93a4Safresh1sub ok { Unicode::Normalize::ok(\$count, @_) } 165759b3d2Safresh1 175759b3d2Safresh1use Unicode::Normalize qw(:all); 185759b3d2Safresh1 195759b3d2Safresh1ok(1); 205759b3d2Safresh1 21*256a93a4Safresh1sub _pack_U { Unicode::Normalize::dot_t_pack_U(@_) } 225759b3d2Safresh1sub hexU { _pack_U map hex, split ' ', shift } 235759b3d2Safresh1 245759b3d2Safresh1# This won't work on EBCDIC platforms prior to v5.8.0, which is when this 255759b3d2Safresh1# translation function was defined 265759b3d2Safresh1*to_native = (defined &utf8::unicode_to_native) 275759b3d2Safresh1 ? \&utf8::unicode_to_native 285759b3d2Safresh1 : sub { return shift }; 295759b3d2Safresh1 305759b3d2Safresh1######################### 315759b3d2Safresh1 325759b3d2Safresh1ok(getCombinClass( to_native(0)), 0); 335759b3d2Safresh1ok(getCombinClass(to_native(41)), 0); 345759b3d2Safresh1ok(getCombinClass(to_native(65)), 0); 355759b3d2Safresh1ok(getCombinClass( 768), 230); 365759b3d2Safresh1ok(getCombinClass(1809), 36); 375759b3d2Safresh1 385759b3d2Safresh1ok(getCanon(to_native( 0)), undef); 395759b3d2Safresh1ok(getCanon(to_native(0x29)), undef); 405759b3d2Safresh1ok(getCanon(to_native(0x41)), undef); 415759b3d2Safresh1ok(getCanon(to_native(0x00C0)), _pack_U(0x0041, 0x0300)); 425759b3d2Safresh1ok(getCanon(to_native(0x00EF)), _pack_U(0x0069, 0x0308)); 435759b3d2Safresh1ok(getCanon(0x304C), _pack_U(0x304B, 0x3099)); 445759b3d2Safresh1ok(getCanon(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301)); 455759b3d2Safresh1ok(getCanon(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345)); 465759b3d2Safresh1ok(getCanon(0x1FAF), _pack_U(0x03A9, 0x0314, 0x0342, 0x0345)); 475759b3d2Safresh1ok(getCanon(0xAC00), _pack_U(0x1100, 0x1161)); 485759b3d2Safresh1ok(getCanon(0xAE00), _pack_U(0x1100, 0x1173, 0x11AF)); 495759b3d2Safresh1ok(getCanon(0x212C), undef); 505759b3d2Safresh1ok(getCanon(0x3243), undef); 515759b3d2Safresh1ok(getCanon(0xFA2D), _pack_U(0x9DB4)); 525759b3d2Safresh1 535759b3d2Safresh1# 20 545759b3d2Safresh1 555759b3d2Safresh1ok(getCompat(to_native( 0)), undef); 565759b3d2Safresh1ok(getCompat(to_native(0x29)), undef); 575759b3d2Safresh1ok(getCompat(to_native(0x41)), undef); 585759b3d2Safresh1ok(getCompat(to_native(0x00C0)), _pack_U(0x0041, 0x0300)); 595759b3d2Safresh1ok(getCompat(to_native(0x00EF)), _pack_U(0x0069, 0x0308)); 605759b3d2Safresh1ok(getCompat(0x304C), _pack_U(0x304B, 0x3099)); 615759b3d2Safresh1ok(getCompat(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301)); 625759b3d2Safresh1ok(getCompat(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345)); 635759b3d2Safresh1ok(getCompat(0x1FAF), _pack_U(0x03A9, 0x0314, 0x0342, 0x0345)); 645759b3d2Safresh1ok(getCompat(0x212C), _pack_U(0x0042)); 655759b3d2Safresh1ok(getCompat(0x3243), _pack_U(0x0028, 0x81F3, 0x0029)); 665759b3d2Safresh1ok(getCompat(0xAC00), _pack_U(0x1100, 0x1161)); 675759b3d2Safresh1ok(getCompat(0xAE00), _pack_U(0x1100, 0x1173, 0x11AF)); 685759b3d2Safresh1ok(getCompat(0xFA2D), _pack_U(0x9DB4)); 695759b3d2Safresh1 705759b3d2Safresh1# 34 715759b3d2Safresh1 725759b3d2Safresh1ok(getComposite(to_native( 0), to_native( 0)), undef); 735759b3d2Safresh1ok(getComposite(to_native( 0), to_native(0x29)), undef); 745759b3d2Safresh1ok(getComposite(to_native(0x29), to_native( 0)), undef); 755759b3d2Safresh1ok(getComposite(to_native(0x29), to_native(0x29)), undef); 765759b3d2Safresh1ok(getComposite(to_native( 0), to_native(0x41)), undef); 775759b3d2Safresh1ok(getComposite(to_native(0x41), to_native( 0)), undef); 785759b3d2Safresh1ok(getComposite(to_native(0x41), to_native(0x41)), undef); 795759b3d2Safresh1ok(getComposite(to_native(12), to_native(0x0300)), undef); 805759b3d2Safresh1ok(getComposite(to_native(0x0055), 0xFF00), undef); 815759b3d2Safresh1ok(getComposite(to_native(0x0041), 0x0300), to_native(0x00C0)); 825759b3d2Safresh1ok(getComposite(to_native(0x0055), 0x0300), to_native(0x00D9)); 835759b3d2Safresh1ok(getComposite(0x0112, 0x0300), 0x1E14); 845759b3d2Safresh1ok(getComposite(0x1100, 0x1161), 0xAC00); 855759b3d2Safresh1ok(getComposite(0x1100, 0x1173), 0xADF8); 865759b3d2Safresh1ok(getComposite(0x1100, 0x11AF), undef); 875759b3d2Safresh1ok(getComposite(0x1173, 0x11AF), undef); 885759b3d2Safresh1ok(getComposite(0xAC00, 0x11A7), undef); 895759b3d2Safresh1ok(getComposite(0xAC00, 0x11A8), 0xAC01); 905759b3d2Safresh1ok(getComposite(0xADF8, 0x11AF), 0xAE00); 915759b3d2Safresh1 925759b3d2Safresh1# 53 935759b3d2Safresh1 945759b3d2Safresh1sub uprops { 955759b3d2Safresh1 my $uv = shift; 965759b3d2Safresh1 my $r = ""; 975759b3d2Safresh1 $r .= isExclusion($uv) ? 'X' : 'x'; 985759b3d2Safresh1 $r .= isSingleton($uv) ? 'S' : 's'; 995759b3d2Safresh1 $r .= isNonStDecomp($uv) ? 'N' : 'n'; # Non-Starter Decomposition 1005759b3d2Safresh1 $r .= isComp_Ex($uv) ? 'F' : 'f'; # Full exclusion (X + S + N) 1015759b3d2Safresh1 $r .= isComp2nd($uv) ? 'B' : 'b'; # B = M = Y 1025759b3d2Safresh1 $r .= isNFD_NO($uv) ? 'D' : 'd'; 1035759b3d2Safresh1 $r .= isNFC_MAYBE($uv) ? 'M' : 'm'; # Maybe 1045759b3d2Safresh1 $r .= isNFC_NO($uv) ? 'C' : 'c'; 1055759b3d2Safresh1 $r .= isNFKD_NO($uv) ? 'K' : 'k'; 1065759b3d2Safresh1 $r .= isNFKC_MAYBE($uv) ? 'Y' : 'y'; # maYbe 1075759b3d2Safresh1 $r .= isNFKC_NO($uv) ? 'G' : 'g'; 1085759b3d2Safresh1 return $r; 1095759b3d2Safresh1} 1105759b3d2Safresh1 1115759b3d2Safresh1ok(uprops(to_native(0x0000)), 'xsnfbdmckyg'); # NULL 1125759b3d2Safresh1ok(uprops(to_native(0x0029)), 'xsnfbdmckyg'); # RIGHT PARENTHESIS 1135759b3d2Safresh1ok(uprops(to_native(0x0041)), 'xsnfbdmckyg'); # LATIN CAPITAL LETTER A 1145759b3d2Safresh1ok(uprops(to_native(0x00A0)), 'xsnfbdmcKyG'); # NO-BREAK SPACE 1155759b3d2Safresh1ok(uprops(to_native(0x00C0)), 'xsnfbDmcKyg'); # LATIN CAPITAL LETTER A WITH GRAVE 1165759b3d2Safresh1ok(uprops(0x0300), 'xsnfBdMckYg'); # COMBINING GRAVE ACCENT 1175759b3d2Safresh1ok(uprops(0x0344), 'xsNFbDmCKyG'); # COMBINING GREEK DIALYTIKA TONOS 1185759b3d2Safresh1ok(uprops(0x0387), 'xSnFbDmCKyG'); # GREEK ANO TELEIA 1195759b3d2Safresh1ok(uprops(0x0958), 'XsnFbDmCKyG'); # DEVANAGARI LETTER QA 1205759b3d2Safresh1ok(uprops(0x0F43), 'XsnFbDmCKyG'); # TIBETAN LETTER GHA 1215759b3d2Safresh1ok(uprops(0x1100), 'xsnfbdmckyg'); # HANGUL CHOSEONG KIYEOK 1225759b3d2Safresh1ok(uprops(0x1161), 'xsnfBdMckYg'); # HANGUL JUNGSEONG A 1235759b3d2Safresh1ok(uprops(0x11AF), 'xsnfBdMckYg'); # HANGUL JONGSEONG RIEUL 1245759b3d2Safresh1ok(uprops(0x212B), 'xSnFbDmCKyG'); # ANGSTROM SIGN 1255759b3d2Safresh1ok(uprops(0xAC00), 'xsnfbDmcKyg'); # HANGUL SYLLABLE GA 1265759b3d2Safresh1ok(uprops(0xF900), 'xSnFbDmCKyG'); # CJK COMPATIBILITY IDEOGRAPH-F900 1275759b3d2Safresh1ok(uprops(0xFB4E), 'XsnFbDmCKyG'); # HEBREW LETTER PE WITH RAFE 1285759b3d2Safresh1ok(uprops(0xFF71), 'xsnfbdmcKyG'); # HALFWIDTH KATAKANA LETTER A 1295759b3d2Safresh1 1305759b3d2Safresh1# 71 1315759b3d2Safresh1 1325759b3d2Safresh1ok(decompose(""), ""); 1335759b3d2Safresh1ok(decompose("A"), "A"); 1345759b3d2Safresh1ok(decompose("", 1), ""); 1355759b3d2Safresh1ok(decompose("A", 1), "A"); 1365759b3d2Safresh1 1375759b3d2Safresh1ok(decompose(hexU("1E14 AC01")), hexU("0045 0304 0300 1100 1161 11A8")); 1385759b3d2Safresh1ok(decompose(hexU("AC00 AE00")), hexU("1100 1161 1100 1173 11AF")); 1395759b3d2Safresh1ok(decompose(hexU("304C FF76")), hexU("304B 3099 FF76")); 1405759b3d2Safresh1 1415759b3d2Safresh1ok(decompose(hexU("1E14 AC01"), 1), hexU("0045 0304 0300 1100 1161 11A8")); 1425759b3d2Safresh1ok(decompose(hexU("AC00 AE00"), 1), hexU("1100 1161 1100 1173 11AF")); 1435759b3d2Safresh1ok(decompose(hexU("304C FF76"), 1), hexU("304B 3099 30AB")); 1445759b3d2Safresh1 1455759b3d2Safresh1# don't modify the source 1465759b3d2Safresh1my $sDec = "\x{FA19}"; 1475759b3d2Safresh1ok(decompose($sDec), "\x{795E}"); 1485759b3d2Safresh1ok($sDec, "\x{FA19}"); 1495759b3d2Safresh1 1505759b3d2Safresh1# 83 1515759b3d2Safresh1 1525759b3d2Safresh1ok(reorder(""), ""); 1535759b3d2Safresh1ok(reorder("A"), "A"); 1545759b3d2Safresh1ok(reorder(hexU("0041 0300 0315 0313 031b 0061")), 1555759b3d2Safresh1 hexU("0041 031b 0300 0313 0315 0061")); 1565759b3d2Safresh1ok(reorder(hexU("00C1 0300 0315 0313 031b 0061 309A 3099")), 1575759b3d2Safresh1 hexU("00C1 031b 0300 0313 0315 0061 309A 3099")); 1585759b3d2Safresh1 1595759b3d2Safresh1# don't modify the source 1605759b3d2Safresh1my $sReord = "\x{3000}\x{300}\x{31b}"; 1615759b3d2Safresh1ok(reorder($sReord), "\x{3000}\x{31b}\x{300}"); 1625759b3d2Safresh1ok($sReord, "\x{3000}\x{300}\x{31b}"); 1635759b3d2Safresh1 1645759b3d2Safresh1# 89 1655759b3d2Safresh1 1665759b3d2Safresh1ok(compose(""), ""); 1675759b3d2Safresh1ok(compose("A"), "A"); 1685759b3d2Safresh1ok(compose(hexU("0061 0300")), hexU("00E0")); 1695759b3d2Safresh1ok(compose(hexU("0061 0300 031B")), hexU("00E0 031B")); 1705759b3d2Safresh1ok(compose(hexU("0061 0300 0315")), hexU("00E0 0315")); 1715759b3d2Safresh1ok(compose(hexU("0061 0300 0313")), hexU("00E0 0313")); 1725759b3d2Safresh1ok(compose(hexU("0061 031B 0300")), hexU("00E0 031B")); 1735759b3d2Safresh1ok(compose(hexU("0061 0315 0300")), hexU("0061 0315 0300")); 1745759b3d2Safresh1ok(compose(hexU("0061 0313 0300")), hexU("0061 0313 0300")); 1755759b3d2Safresh1 1765759b3d2Safresh1# don't modify the source 1775759b3d2Safresh1my $sCom = "\x{304B}\x{3099}"; 1785759b3d2Safresh1ok(compose($sCom), "\x{304C}"); 1795759b3d2Safresh1ok($sCom, "\x{304B}\x{3099}"); 1805759b3d2Safresh1 1815759b3d2Safresh1# 100 1825759b3d2Safresh1 1835759b3d2Safresh1ok(composeContiguous(""), ""); 1845759b3d2Safresh1ok(composeContiguous("A"), "A"); 1855759b3d2Safresh1ok(composeContiguous(hexU("0061 0300")), hexU("00E0")); 1865759b3d2Safresh1ok(composeContiguous(hexU("0061 0300 031B")), hexU("00E0 031B")); 1875759b3d2Safresh1ok(composeContiguous(hexU("0061 0300 0315")), hexU("00E0 0315")); 1885759b3d2Safresh1ok(composeContiguous(hexU("0061 0300 0313")), hexU("00E0 0313")); 1895759b3d2Safresh1ok(composeContiguous(hexU("0061 031B 0300")), hexU("0061 031B 0300")); 1905759b3d2Safresh1ok(composeContiguous(hexU("0061 0315 0300")), hexU("0061 0315 0300")); 1915759b3d2Safresh1ok(composeContiguous(hexU("0061 0313 0300")), hexU("0061 0313 0300")); 1925759b3d2Safresh1 1935759b3d2Safresh1# don't modify the source 1945759b3d2Safresh1my $sCtg = "\x{30DB}\x{309A}"; 1955759b3d2Safresh1ok(composeContiguous($sCtg), "\x{30DD}"); 1965759b3d2Safresh1ok($sCtg, "\x{30DB}\x{309A}"); 1975759b3d2Safresh1 1985759b3d2Safresh1# 111 1995759b3d2Safresh1 2005759b3d2Safresh1sub answer { defined $_[0] ? $_[0] ? "YES" : "NO" : "MAYBE" } 2015759b3d2Safresh1 2025759b3d2Safresh1ok(answer(checkNFD("")), "YES"); 2035759b3d2Safresh1ok(answer(checkNFC("")), "YES"); 2045759b3d2Safresh1ok(answer(checkNFKD("")), "YES"); 2055759b3d2Safresh1ok(answer(checkNFKC("")), "YES"); 2065759b3d2Safresh1ok(answer(check("NFD", "")), "YES"); 2075759b3d2Safresh1ok(answer(check("NFC", "")), "YES"); 2085759b3d2Safresh1ok(answer(check("NFKD","")), "YES"); 2095759b3d2Safresh1ok(answer(check("NFKC","")), "YES"); 2105759b3d2Safresh1 2115759b3d2Safresh1# U+0000 to U+007F are prenormalized in all the normalization forms. 2125759b3d2Safresh1ok(answer(checkNFD("AZaz\t12!#`")), "YES"); 2135759b3d2Safresh1ok(answer(checkNFC("AZaz\t12!#`")), "YES"); 2145759b3d2Safresh1ok(answer(checkNFKD("AZaz\t12!#`")), "YES"); 2155759b3d2Safresh1ok(answer(checkNFKC("AZaz\t12!#`")), "YES"); 2165759b3d2Safresh1ok(answer(check("D", "AZaz\t12!#`")), "YES"); 2175759b3d2Safresh1ok(answer(check("C", "AZaz\t12!#`")), "YES"); 2185759b3d2Safresh1ok(answer(check("KD","AZaz\t12!#`")), "YES"); 2195759b3d2Safresh1ok(answer(check("KC","AZaz\t12!#`")), "YES"); 2205759b3d2Safresh1 2215759b3d2Safresh1ok(answer(checkNFD(NFD(_pack_U(0xC1, 0x1100, 0x1173, 0x11AF)))), "YES"); 2225759b3d2Safresh1ok(answer(checkNFD(hexU("20 C1 1100 1173 11AF"))), "NO"); 2235759b3d2Safresh1ok(answer(checkNFC(hexU("20 C1 1173 11AF"))), "MAYBE"); 2245759b3d2Safresh1ok(answer(checkNFC(hexU("20 C1 AE00 1100"))), "YES"); 2255759b3d2Safresh1ok(answer(checkNFC(hexU("20 C1 AE00 1100 0300"))), "MAYBE"); 2265759b3d2Safresh1ok(answer(checkNFC(hexU("212B 1100 0300"))), "NO"); 2275759b3d2Safresh1ok(answer(checkNFC(hexU("1100 0300 212B"))), "NO"); 2285759b3d2Safresh1ok(answer(checkNFC(hexU("0041 0327 030A"))), "MAYBE"); # A+cedilla+ring 2295759b3d2Safresh1ok(answer(checkNFC(hexU("0041 030A 0327"))), "NO"); # A+ring+cedilla 2305759b3d2Safresh1ok(answer(checkNFC(hexU("20 C1 FF71 2025"))),"YES"); 2315759b3d2Safresh1ok(answer(check("NFC", hexU("20 C1 212B 300"))), "NO"); 2325759b3d2Safresh1ok(answer(checkNFKD(hexU("20 C1 FF71 2025"))), "NO"); 2335759b3d2Safresh1ok(answer(checkNFKC(hexU("20 C1 AE00 2025"))), "NO"); 2345759b3d2Safresh1ok(answer(checkNFKC(hexU("212B 1100 0300"))), "NO"); 2355759b3d2Safresh1ok(answer(checkNFKC(hexU("1100 0300 212B"))), "NO"); 2365759b3d2Safresh1ok(answer(checkNFKC(hexU("0041 0327 030A"))), "MAYBE"); # A+cedilla+ring 2375759b3d2Safresh1ok(answer(checkNFKC(hexU("0041 030A 0327"))), "NO"); # A+ring+cedilla 2385759b3d2Safresh1ok(answer(check("NFKC", hexU("20 C1 212B 300"))), "NO"); 2395759b3d2Safresh1 2405759b3d2Safresh1# 145 2415759b3d2Safresh1 2425759b3d2Safresh1"012ABC" =~ /(\d+)(\w+)/; 2435759b3d2Safresh1ok("012" eq NFC $1 && "ABC" eq NFC $2); 2445759b3d2Safresh1 2455759b3d2Safresh1ok(normalize('C', $1), "012"); 2465759b3d2Safresh1ok(normalize('C', $2), "ABC"); 2475759b3d2Safresh1 2485759b3d2Safresh1ok(normalize('NFC', $1), "012"); 2495759b3d2Safresh1ok(normalize('NFC', $2), "ABC"); 2505759b3d2Safresh1 # s/^NF// in normalize() must not prevent using $1, $&, etc. 2515759b3d2Safresh1 2525759b3d2Safresh1# 150 2535759b3d2Safresh1 2545759b3d2Safresh1# a string with initial zero should be treated like a number 2555759b3d2Safresh1 2565759b3d2Safresh1# LATIN CAPITAL LETTER A WITH GRAVE 2575759b3d2Safresh1ok(getCombinClass(sprintf("0%d", to_native(192))), 0); 2585759b3d2Safresh1ok(getCanon (sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300)); 2595759b3d2Safresh1ok(getCompat(sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300)); 2605759b3d2Safresh1my $lead_zero = sprintf "0%d", to_native(65); 2615759b3d2Safresh1ok(getComposite($lead_zero, "0768"), to_native(192)); 2625759b3d2Safresh1ok(isNFD_NO (sprintf("0%d", to_native(192)))); 2635759b3d2Safresh1ok(isNFKD_NO(sprintf("0%d", to_native(192)))); 2645759b3d2Safresh1 2655759b3d2Safresh1# DEVANAGARI LETTER QA 2665759b3d2Safresh1ok(isExclusion("02392")); 2675759b3d2Safresh1ok(isComp_Ex ("02392")); 2685759b3d2Safresh1ok(isNFC_NO ("02392")); 2695759b3d2Safresh1ok(isNFKC_NO ("02392")); 2705759b3d2Safresh1ok(isNFD_NO ("02392")); 2715759b3d2Safresh1ok(isNFKD_NO ("02392")); 2725759b3d2Safresh1 2735759b3d2Safresh1# ANGSTROM SIGN 2745759b3d2Safresh1ok(isSingleton("08491")); 2755759b3d2Safresh1ok(isComp_Ex ("08491")); 2765759b3d2Safresh1ok(isNFC_NO ("08491")); 2775759b3d2Safresh1ok(isNFKC_NO ("08491")); 2785759b3d2Safresh1ok(isNFD_NO ("08491")); 2795759b3d2Safresh1ok(isNFKD_NO ("08491")); 2805759b3d2Safresh1 2815759b3d2Safresh1# COMBINING GREEK DIALYTIKA TONOS 2825759b3d2Safresh1ok(isNonStDecomp("0836")); 2835759b3d2Safresh1ok(isComp_Ex ("0836")); 2845759b3d2Safresh1ok(isNFC_NO ("0836")); 2855759b3d2Safresh1ok(isNFKC_NO ("0836")); 2865759b3d2Safresh1ok(isNFD_NO ("0836")); 2875759b3d2Safresh1ok(isNFKD_NO ("0836")); 2885759b3d2Safresh1 2895759b3d2Safresh1# COMBINING GRAVE ACCENT 2905759b3d2Safresh1ok(getCombinClass("0768"), 230); 2915759b3d2Safresh1ok(isComp2nd ("0768")); 2925759b3d2Safresh1ok(isNFC_MAYBE ("0768")); 2935759b3d2Safresh1ok(isNFKC_MAYBE("0768")); 2945759b3d2Safresh1 2955759b3d2Safresh1# HANGUL SYLLABLE GA 2965759b3d2Safresh1ok(getCombinClass("044032"), 0); 2975759b3d2Safresh1ok(getCanon("044032"), _pack_U(0x1100, 0x1161)); 2985759b3d2Safresh1ok(getCompat("044032"), _pack_U(0x1100, 0x1161)); 2995759b3d2Safresh1ok(getComposite("04352", "04449"), 0xAC00); 3005759b3d2Safresh1 3015759b3d2Safresh1# 182 3025759b3d2Safresh1 3035759b3d2Safresh1# string with 22 combining characters: (0x300..0x315) 3045759b3d2Safresh1my $str_cc22 = _pack_U(0x3041, 0x300..0x315, 0x3042); 3055759b3d2Safresh1ok(decompose($str_cc22), $str_cc22); 3065759b3d2Safresh1ok(reorder($str_cc22), $str_cc22); 3075759b3d2Safresh1ok(compose($str_cc22), $str_cc22); 3085759b3d2Safresh1ok(composeContiguous($str_cc22), $str_cc22); 3095759b3d2Safresh1ok(NFD($str_cc22), $str_cc22); 3105759b3d2Safresh1ok(NFC($str_cc22), $str_cc22); 3115759b3d2Safresh1ok(NFKD($str_cc22), $str_cc22); 3125759b3d2Safresh1ok(NFKC($str_cc22), $str_cc22); 3135759b3d2Safresh1ok(FCD($str_cc22), $str_cc22); 3145759b3d2Safresh1ok(FCC($str_cc22), $str_cc22); 3155759b3d2Safresh1 3165759b3d2Safresh1# 192 3175759b3d2Safresh1 3185759b3d2Safresh1# string with 40 combining characters of the same class: (0x300..0x313)x2 3195759b3d2Safresh1my $str_cc40 = _pack_U(0x3041, 0x300..0x313, 0x300..0x313, 0x3042); 3205759b3d2Safresh1ok(decompose($str_cc40), $str_cc40); 3215759b3d2Safresh1ok(reorder($str_cc40), $str_cc40); 3225759b3d2Safresh1ok(compose($str_cc40), $str_cc40); 3235759b3d2Safresh1ok(composeContiguous($str_cc40), $str_cc40); 3245759b3d2Safresh1ok(NFD($str_cc40), $str_cc40); 3255759b3d2Safresh1ok(NFC($str_cc40), $str_cc40); 3265759b3d2Safresh1ok(NFKD($str_cc40), $str_cc40); 3275759b3d2Safresh1ok(NFKC($str_cc40), $str_cc40); 3285759b3d2Safresh1ok(FCD($str_cc40), $str_cc40); 3295759b3d2Safresh1ok(FCC($str_cc40), $str_cc40); 3305759b3d2Safresh1 3315759b3d2Safresh1# 202 3325759b3d2Safresh1 3335759b3d2Safresh1my $precomp = hexU("304C 304E 3050 3052 3054"); 3345759b3d2Safresh1my $combseq = hexU("304B 3099 304D 3099 304F 3099 3051 3099 3053 3099"); 3355759b3d2Safresh1ok(decompose($precomp x 5), $combseq x 5); 3365759b3d2Safresh1ok(decompose($precomp x 10), $combseq x 10); 3375759b3d2Safresh1ok(decompose($precomp x 20), $combseq x 20); 3385759b3d2Safresh1 3395759b3d2Safresh1my $hangsyl = hexU("AC00 B098 B2E4 B77C B9C8"); 3405759b3d2Safresh1my $jamoseq = hexU("1100 1161 1102 1161 1103 1161 1105 1161 1106 1161"); 3415759b3d2Safresh1ok(decompose($hangsyl x 5), $jamoseq x 5); 3425759b3d2Safresh1ok(decompose($hangsyl x 10), $jamoseq x 10); 3435759b3d2Safresh1ok(decompose($hangsyl x 20), $jamoseq x 20); 3445759b3d2Safresh1 3455759b3d2Safresh1my $notcomp = hexU("304B 304D 304F 3051 3053"); 3465759b3d2Safresh1ok(decompose($precomp . $notcomp), $combseq . $notcomp); 3475759b3d2Safresh1ok(decompose($precomp . $notcomp x 5), $combseq . $notcomp x 5); 3485759b3d2Safresh1ok(decompose($precomp . $notcomp x10), $combseq . $notcomp x10); 3495759b3d2Safresh1 3505759b3d2Safresh1# 211 3515759b3d2Safresh1 3525759b3d2Safresh1my $preUnicode3_1 = !defined getCanon(0x1D15E); 3535759b3d2Safresh1my $preUnicode3_2 = !defined getCanon(0x2ADC); 3545759b3d2Safresh1 3555759b3d2Safresh1# HEBREW LETTER YOD WITH HIRIQ 3565759b3d2Safresh1ok($preUnicode3_1 xor isExclusion(0xFB1D)); 3575759b3d2Safresh1ok($preUnicode3_1 xor isComp_Ex (0xFB1D)); 3585759b3d2Safresh1 3595759b3d2Safresh1# MUSICAL SYMBOL HALF NOTE 3605759b3d2Safresh1ok($preUnicode3_1 xor isExclusion(0x1D15E)); 3615759b3d2Safresh1ok($preUnicode3_1 xor isComp_Ex (0x1D15E)); 3625759b3d2Safresh1 3635759b3d2Safresh1# FORKING 3645759b3d2Safresh1ok($preUnicode3_2 xor isExclusion(0x2ADC)); 3655759b3d2Safresh1ok($preUnicode3_2 xor isComp_Ex (0x2ADC)); 3665759b3d2Safresh1 3675759b3d2Safresh1# 217 3685759b3d2Safresh1 369