1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
#!perl
use strict;
use warnings;
use Unicode::Collate::Locale;
use Test;
plan tests => 83;
my $eth = pack 'U', 0xF0;
my $ETH = pack 'U', 0xD0;
my $thrn = pack 'U', 0xFE;
my $THRN = pack 'U', 0xDE;
my $uuml = pack 'U', 0xFC;
my $Uuml = pack 'U', 0xDC;
my $ae = pack 'U', 0xE6;
my $AE = pack 'U', 0xC6;
my $auml = pack 'U', 0xE4;
my $Auml = pack 'U', 0xC4;
my $ostk = pack 'U', 0xF8;
my $Ostk = pack 'U', 0xD8;
my $ouml = pack 'U', 0xF6;
my $Ouml = pack 'U', 0xD6;
my $arng = pack 'U', 0xE5;
my $Arng = pack 'U', 0xC5;
my $objNn = Unicode::Collate::Locale->
new(locale => 'NN', normalization => undef);
ok(1);
ok($objNn->getlocale, 'nn');
$objNn->change(level => 1);
ok($objNn->lt("z", $ae));
ok($objNn->lt($ae, $ostk));
ok($objNn->lt($ostk, $arng));
ok($objNn->lt($arng, "\x{292}"));
# 6
ok($objNn->eq('d', "\x{111}"));
ok($objNn->eq("\x{111}", $eth));
ok($objNn->eq('y', $uuml));
ok($objNn->eq($uuml, "\x{171}"));
ok($objNn->eq($ae, $auml));
ok($objNn->eq($auml, "\x{119}"));
ok($objNn->eq($ostk, $ouml));
ok($objNn->eq($ouml, "\x{151}"));
ok($objNn->eq("\x{151}", "\x{153}"));
# 15
$objNn->change(level => 2);
ok($objNn->lt('d', "\x{111}"));
ok($objNn->lt("\x{111}", $eth));
ok($objNn->lt('y', $uuml));
ok($objNn->lt($uuml, "\x{171}"));
ok($objNn->lt($ae, $auml));
ok($objNn->lt($auml, "\x{119}"));
ok($objNn->lt($ostk, $ouml));
ok($objNn->lt($ouml, "\x{151}"));
ok($objNn->lt("\x{151}", "\x{153}"));
# 24
ok($objNn->eq("\x{111}", "\x{110}"));
ok($objNn->eq($eth, $ETH));
ok($objNn->eq('th', $thrn));
ok($objNn->eq($thrn, 'TH'));
ok($objNn->eq('TH', $THRN));
ok($objNn->eq($uuml, $Uuml));
ok($objNn->eq("\x{171}", "\x{170}"));
ok($objNn->eq($ae, $AE));
ok($objNn->eq($AE, "\x{1D2D}"));
ok($objNn->eq($auml, $Auml));
ok($objNn->eq("\x{119}", "\x{118}"));
ok($objNn->eq($ostk, $Ostk));
ok($objNn->eq($ouml, $Ouml));
ok($objNn->eq("\x{151}", "\x{150}"));
ok($objNn->eq("\x{153}", "\x{152}"));
ok($objNn->eq($arng, $Arng));
# 40
$objNn->change(level => 3);
ok($objNn->lt("\x{111}", "\x{110}"));
ok($objNn->lt($eth, $ETH));
ok($objNn->lt('th', $thrn));
ok($objNn->lt($thrn, 'TH'));
ok($objNn->lt('TH', $THRN));
ok($objNn->lt($uuml, $Uuml));
ok($objNn->lt("\x{171}", "\x{170}"));
ok($objNn->lt($ae, $AE));
ok($objNn->lt($AE, "\x{1D2D}"));
ok($objNn->lt($auml, $Auml));
ok($objNn->lt("\x{119}", "\x{118}"));
ok($objNn->lt($ostk, $Ostk));
ok($objNn->lt($ouml, $Ouml));
ok($objNn->lt("\x{151}", "\x{150}"));
ok($objNn->lt("\x{153}", "\x{152}"));
ok($objNn->lt($arng, $Arng));
# 56
ok($objNn->eq("d\x{335}", "\x{111}"));
ok($objNn->eq("D\x{335}", "\x{110}"));
ok($objNn->eq("u\x{308}", $uuml));
ok($objNn->eq("U\x{308}", $Uuml));
ok($objNn->eq("u\x{30B}", "\x{171}"));
ok($objNn->eq("U\x{30B}", "\x{170}"));
ok($objNn->eq("\x{1FD}", "$ae\x{301}"));
ok($objNn->eq("\x{1FC}", "$AE\x{301}"));
ok($objNn->eq("\x{1E3}", "$ae\x{304}"));
ok($objNn->eq("\x{1E2}", "$AE\x{304}"));
# 66
ok($objNn->eq("a\x{308}", $auml));
ok($objNn->eq("A\x{308}", $Auml));
ok($objNn->eq("e\x{328}", "\x{119}"));
ok($objNn->eq("E\x{328}", "\x{118}"));
ok($objNn->eq("o\x{338}", $ostk));
ok($objNn->eq("O\x{338}", $Ostk));
ok($objNn->eq("o\x{338}\x{301}", "\x{1FF}"));
ok($objNn->eq("O\x{338}\x{301}", "\x{1FE}"));
ok($objNn->eq("o\x{308}", $ouml));
ok($objNn->eq("O\x{308}", $Ouml));
ok($objNn->eq("o\x{30B}", "\x{151}"));
ok($objNn->eq("O\x{30B}", "\x{150}"));
ok($objNn->eq("a\x{30A}", $arng));
ok($objNn->eq("A\x{30A}", $Arng));
ok($objNn->eq("A\x{30A}", "\x{212B}"));
ok($objNn->eq("a\x{30A}\x{301}", "\x{1FB}"));
ok($objNn->eq("A\x{30A}\x{301}", "\x{1FA}"));
# 83
|