Commit | Line | Data |
82e740b6 |
1 | |
2 | BEGIN { |
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 | |
10 | BEGIN { |
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 | |
19 | use Test; |
20 | use strict; |
21 | use warnings; |
22 | BEGIN { plan tests => 42 }; |
23 | use Unicode::Normalize qw(:all); |
24 | ok(1); # If we made it this far, we're ok. |
25 | |
26 | ######################### |
27 | |
28 | # unary op. RING-CEDILLA |
29 | ok( "\x{30A}\x{327}" ne "\x{327}\x{30A}"); |
30 | ok(NFD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
31 | ok(NFC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
32 | ok(NFKD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
33 | ok(NFKC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
34 | ok(FCD "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
35 | ok(FCC "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
36 | ok(reorder "\x{30A}\x{327}" eq "\x{327}\x{30A}"); |
37 | |
38 | ok(prototype \&normalize,'$$'); |
39 | ok(prototype \&NFD, '$'); |
40 | ok(prototype \&NFC, '$'); |
41 | ok(prototype \&NFKD, '$'); |
42 | ok(prototype \&NFKC, '$'); |
43 | ok(prototype \&FCD, '$'); |
44 | ok(prototype \&FCC, '$'); |
45 | |
46 | ok(prototype \&check, '$$'); |
47 | ok(prototype \&checkNFD, '$'); |
48 | ok(prototype \&checkNFC, '$'); |
49 | ok(prototype \&checkNFKD,'$'); |
50 | ok(prototype \&checkNFKC,'$'); |
51 | ok(prototype \&checkFCD, '$'); |
52 | ok(prototype \&checkFCC, '$'); |
53 | |
54 | ok(prototype \&decompose, '$;$'); |
55 | ok(prototype \&reorder, '$'); |
56 | ok(prototype \&compose, '$'); |
57 | ok(prototype \&composeContiguous, '$'); |
58 | |
59 | ok(prototype \&getCanon, '$'); |
60 | ok(prototype \&getCompat, '$'); |
61 | ok(prototype \&getComposite, '$$'); |
62 | ok(prototype \&getCombinClass,'$'); |
63 | ok(prototype \&isExclusion, '$'); |
64 | ok(prototype \&isSingleton, '$'); |
65 | ok(prototype \&isNonStDecomp, '$'); |
66 | ok(prototype \&isComp2nd, '$'); |
67 | ok(prototype \&isComp_Ex, '$'); |
68 | |
69 | ok(prototype \&isNFD_NO, '$'); |
70 | ok(prototype \&isNFC_NO, '$'); |
71 | ok(prototype \&isNFC_MAYBE, '$'); |
72 | ok(prototype \&isNFKD_NO, '$'); |
73 | ok(prototype \&isNFKC_NO, '$'); |
74 | ok(prototype \&isNFKC_MAYBE, '$'); |
75 | |