3 unless ("A" eq pack('U', 0x41)) {
4 print "1..0 # Unicode::Normalize " .
5 "cannot stringify a Unicode code point\n";
11 if ($ENV{PERL_CORE}) {
13 @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
17 #########################
22 use Unicode::Normalize qw(:all);
27 # if $_ is not NULL-terminated, test may fail.
30 print /c$/ ? "ok" : "not ok", " 2\n";
32 $_ = decompose('abc');
33 print /c$/ ? "ok" : "not ok", " 3\n";
36 print /c$/ ? "ok" : "not ok", " 4\n";
39 print /c$/ ? "ok" : "not ok", " 5\n";
42 print /c$/ ? "ok" : "not ok", " 6\n";
45 print /c$/ ? "ok" : "not ok", " 7\n";
48 print /c$/ ? "ok" : "not ok", " 8\n";
51 print /c$/ ? "ok" : "not ok", " 9\n";
53 $_ = decompose("\x{304C}abc");
54 print /c$/ ? "ok" : "not ok", " 10\n";
56 $_ = decompose("\x{304B}\x{3099}abc");
57 print /c$/ ? "ok" : "not ok", " 11\n";
59 $_ = reorder("\x{304C}abc");
60 print /c$/ ? "ok" : "not ok", " 12\n";
62 $_ = reorder("\x{304B}\x{3099}abc");
63 print /c$/ ? "ok" : "not ok", " 13\n";
65 $_ = compose("\x{304C}abc");
66 print /c$/ ? "ok" : "not ok", " 14\n";
68 $_ = compose("\x{304B}\x{3099}abc");
69 print /c$/ ? "ok" : "not ok", " 15\n";
71 $_ = NFD("\x{304C}abc");
72 print /c$/ ? "ok" : "not ok", " 16\n";
74 $_ = NFC("\x{304C}abc");
75 print /c$/ ? "ok" : "not ok", " 17\n";
77 $_ = NFKD("\x{304C}abc");
78 print /c$/ ? "ok" : "not ok", " 18\n";
80 $_ = NFKC("\x{304C}abc");
81 print /c$/ ? "ok" : "not ok", " 19\n";
83 $_ = FCC("\x{304C}abc");
84 print /c$/ ? "ok" : "not ok", " 20\n";
87 print s/.$// ? "ok" : "not ok", " 21\n";
89 $_ = getCompat(0x100);
90 print s/.$// ? "ok" : "not ok", " 22\n";
92 $_ = getCanon(0xAC00);
93 print s/.$// ? "ok" : "not ok", " 23\n";
95 $_ = getCompat(0xAC00);
96 print s/.$// ? "ok" : "not ok", " 24\n";