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);
18 unless (5.006001 <= $]) {
19 print "1..0 # skipped: Perl 5.6.1 or later".
20 " needed for this test\n";
25 #########################
28 use Unicode::Normalize qw(:all);
33 #########################
37 # U+3042 is 3-byte length (in UTF-8/UTF-EBCDIC)
38 our $a = pack 'U0C', unpack 'C', "\x{3042}";
41 ? "ok" : "not ok", " 2\n";
43 print NFKD($a) eq "\0"
44 ? "ok" : "not ok", " 3\n";
47 ? "ok" : "not ok", " 4\n";
49 print NFKC($a) eq "\0"
50 ? "ok" : "not ok", " 5\n";
52 print decompose($a) eq "\0"
53 ? "ok" : "not ok", " 6\n";
55 print reorder($a) eq "\0"
56 ? "ok" : "not ok", " 7\n";
58 print compose($a) eq "\0"
59 ? "ok" : "not ok", " 8\n";