1 2BEGIN { 3 unless ("A" eq pack('U', 0x41)) { 4 print "1..0 # Unicode::Normalize " . 5 "cannot stringify a Unicode code point\n"; 6 exit 0; 7 } 8} 9 10BEGIN { 11 if ($ENV{PERL_CORE}) { 12 chdir('t') if -d 't'; 13 @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib); 14 } 15} 16 17######################### 18 19use Test; 20use strict; 21use warnings; 22BEGIN { plan tests => 42 }; 23use Unicode::Normalize qw(:all); 24ok(1); # If we made it this far, we're ok. 25 26######################### 27 28# unary op. RING-CEDILLA 29ok( "\x{30A}\x{327}" ne "\x{327}\x{30A}"); 30ok(NFD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 31ok(NFC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 32ok(NFKD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 33ok(NFKC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 34ok(FCD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 35ok(FCC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 36ok(reorder "\x{30A}\x{327}" eq "\x{327}\x{30A}"); 37 38ok(prototype \&normalize,'$$'); 39ok(prototype \&NFD, '$'); 40ok(prototype \&NFC, '$'); 41ok(prototype \&NFKD, '$'); 42ok(prototype \&NFKC, '$'); 43ok(prototype \&FCD, '$'); 44ok(prototype \&FCC, '$'); 45 46ok(prototype \&check, '$$'); 47ok(prototype \&checkNFD, '$'); 48ok(prototype \&checkNFC, '$'); 49ok(prototype \&checkNFKD,'$'); 50ok(prototype \&checkNFKC,'$'); 51ok(prototype \&checkFCD, '$'); 52ok(prototype \&checkFCC, '$'); 53 54ok(prototype \&decompose, '$;$'); 55ok(prototype \&reorder, '$'); 56ok(prototype \&compose, '$'); 57ok(prototype \&composeContiguous, '$'); 58 59ok(prototype \&getCanon, '$'); 60ok(prototype \&getCompat, '$'); 61ok(prototype \&getComposite, '$$'); 62ok(prototype \&getCombinClass,'$'); 63ok(prototype \&isExclusion, '$'); 64ok(prototype \&isSingleton, '$'); 65ok(prototype \&isNonStDecomp, '$'); 66ok(prototype \&isComp2nd, '$'); 67ok(prototype \&isComp_Ex, '$'); 68 69ok(prototype \&isNFD_NO, '$'); 70ok(prototype \&isNFC_NO, '$'); 71ok(prototype \&isNFC_MAYBE, '$'); 72ok(prototype \&isNFKD_NO, '$'); 73ok(prototype \&isNFKC_NO, '$'); 74ok(prototype \&isNFKC_MAYBE, '$'); 75 76