summaryrefslogtreecommitdiff
path: root/cpan/Unicode-Collate/t/loc_vi.t
blob: 8af5154710b2f6b4486d6b169ca00c76f7c6e108 (plain)
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
#!perl
use strict;
use warnings;
use Unicode::Collate::Locale;

use Test;
plan tests => 194;

my $objVi = Unicode::Collate::Locale->
    new(locale => 'VI', normalization => undef);

ok(1);
ok($objVi->getlocale, 'vi');

$objVi->change(level => 1);

ok($objVi->lt("a", "a\x{306}"));
ok($objVi->lt("a\x{306}", "a\x{302}"));
ok($objVi->gt("b", "a\x{302}"));
ok($objVi->lt("d", "d\x{335}"));
ok($objVi->gt("e", "d\x{335}"));
ok($objVi->lt("e", "e\x{302}"));
ok($objVi->gt("f", "e\x{302}"));
ok($objVi->lt("o", "o\x{302}"));
ok($objVi->lt("o\x{302}", "o\x{31B}"));
ok($objVi->gt("p", "o\x{31B}"));
ok($objVi->lt("u", "u\x{31B}"));
ok($objVi->gt("v", "u\x{31B}"));

# 14

ok($objVi->eq("\x{300}", "\x{309}"));
ok($objVi->eq("\x{309}", "\x{303}"));
ok($objVi->eq("\x{303}", "\x{301}"));
ok($objVi->eq("\x{301}", "\x{323}"));
ok($objVi->eq("\x{323}", "\x{306}"));
ok($objVi->eq("\x{306}", "\x{302}"));

ok($objVi->eq("X\x{300}", "X\x{309}"));
ok($objVi->eq("X\x{309}", "X\x{303}"));
ok($objVi->eq("X\x{303}", "X\x{301}"));
ok($objVi->eq("X\x{301}", "X\x{323}"));
ok($objVi->eq("X\x{323}", "X\x{306}"));
ok($objVi->eq("X\x{306}", "X\x{302}"));

# 26

$objVi->change(level => 2);

ok($objVi->lt("\x{300}", "\x{309}"));
ok($objVi->lt("\x{309}", "\x{303}"));
ok($objVi->lt("\x{303}", "\x{301}"));
ok($objVi->lt("\x{301}", "\x{323}"));
ok($objVi->lt("\x{323}", "\x{306}"));
ok($objVi->lt("\x{306}", "\x{302}"));

ok($objVi->lt("X\x{300}", "X\x{309}"));
ok($objVi->lt("X\x{309}", "X\x{303}"));
ok($objVi->lt("X\x{303}", "X\x{301}"));
ok($objVi->lt("X\x{301}", "X\x{323}"));
ok($objVi->lt("X\x{323}", "X\x{306}"));
ok($objVi->lt("X\x{306}", "X\x{302}"));

# 38

ok($objVi->eq("a\x{306}", "A\x{306}"));
ok($objVi->eq("a\x{302}", "A\x{302}"));
ok($objVi->eq("d\x{335}", "D\x{335}"));
ok($objVi->eq("e\x{302}", "E\x{302}"));
ok($objVi->eq("o\x{302}", "O\x{302}"));
ok($objVi->eq("o\x{31B}", "O\x{31B}"));
ok($objVi->eq("u\x{31B}", "U\x{31B}"));

# 45

$objVi->change(level => 3);

ok($objVi->lt("a\x{306}", "A\x{306}"));
ok($objVi->lt("a\x{302}", "A\x{302}"));
ok($objVi->lt("d\x{335}", "D\x{335}"));
ok($objVi->lt("e\x{302}", "E\x{302}"));
ok($objVi->lt("o\x{302}", "O\x{302}"));
ok($objVi->lt("o\x{31B}", "O\x{31B}"));
ok($objVi->lt("u\x{31B}", "U\x{31B}"));

# 52

ok($objVi->eq("a\x{306}", "\x{103}"));
ok($objVi->eq("A\x{306}", "\x{102}"));
ok($objVi->eq("a\x{302}", pack('U', 0xE2)));
ok($objVi->eq("A\x{302}", pack('U', 0xC2)));
ok($objVi->eq("d\x{335}", "\x{111}"));
ok($objVi->eq("D\x{335}", "\x{110}"));
ok($objVi->eq("e\x{302}", pack('U', 0xEA)));
ok($objVi->eq("E\x{302}", pack('U', 0xCA)));
ok($objVi->eq("o\x{302}", pack('U', 0xF4)));
ok($objVi->eq("O\x{302}", pack('U', 0xD4)));
ok($objVi->eq("o\x{31B}", "\x{1A1}"));
ok($objVi->eq("O\x{31B}", "\x{1A0}"));
ok($objVi->eq("u\x{31B}", "\x{1B0}"));
ok($objVi->eq("U\x{31B}", "\x{1AF}"));

# 66

ok($objVi->eq("a\x{300}", pack('U', 0xE0)));
ok($objVi->eq("a\x{309}", "\x{1EA3}"));
ok($objVi->eq("a\x{303}", pack('U', 0xE3)));
ok($objVi->eq("a\x{301}", pack('U', 0xE1)));
ok($objVi->eq("a\x{323}", "\x{1EA1}"));
ok($objVi->eq("A\x{300}", pack('U', 0xC0)));
ok($objVi->eq("A\x{309}", "\x{1EA2}"));
ok($objVi->eq("A\x{303}", pack('U', 0xC3)));
ok($objVi->eq("A\x{301}", pack('U', 0xC1)));
ok($objVi->eq("A\x{323}", "\x{1EA0}"));
ok($objVi->eq("a\x{306}\x{300}", "\x{1EB1}"));
ok($objVi->eq("a\x{306}\x{309}", "\x{1EB3}"));
ok($objVi->eq("a\x{306}\x{303}", "\x{1EB5}"));
ok($objVi->eq("a\x{306}\x{301}", "\x{1EAF}"));
ok($objVi->eq("a\x{306}\x{323}", "\x{1EB7}"));
ok($objVi->eq("A\x{306}\x{300}", "\x{1EB0}"));
ok($objVi->eq("A\x{306}\x{309}", "\x{1EB2}"));
ok($objVi->eq("A\x{306}\x{303}", "\x{1EB4}"));
ok($objVi->eq("A\x{306}\x{301}", "\x{1EAE}"));
ok($objVi->eq("A\x{306}\x{323}", "\x{1EB6}"));
ok($objVi->eq("a\x{302}\x{300}", "\x{1EA7}"));
ok($objVi->eq("a\x{302}\x{309}", "\x{1EA9}"));
ok($objVi->eq("a\x{302}\x{303}", "\x{1EAB}"));
ok($objVi->eq("a\x{302}\x{301}", "\x{1EA5}"));
ok($objVi->eq("a\x{302}\x{323}", "\x{1EAD}"));
ok($objVi->eq("A\x{302}\x{300}", "\x{1EA6}"));
ok($objVi->eq("A\x{302}\x{309}", "\x{1EA8}"));
ok($objVi->eq("A\x{302}\x{303}", "\x{1EAA}"));
ok($objVi->eq("A\x{302}\x{301}", "\x{1EA4}"));
ok($objVi->eq("A\x{302}\x{323}", "\x{1EAC}"));
ok($objVi->eq("e\x{300}", pack('U', 0xE8)));
ok($objVi->eq("e\x{309}", "\x{1EBB}"));
ok($objVi->eq("e\x{303}", "\x{1EBD}"));
ok($objVi->eq("e\x{301}", pack('U', 0xE9)));
ok($objVi->eq("e\x{323}", "\x{1EB9}"));
ok($objVi->eq("E\x{300}", pack('U', 0xC8)));
ok($objVi->eq("E\x{309}", "\x{1EBA}"));
ok($objVi->eq("E\x{303}", "\x{1EBC}"));
ok($objVi->eq("E\x{301}", pack('U', 0xC9)));
ok($objVi->eq("E\x{323}", "\x{1EB8}"));
ok($objVi->eq("e\x{302}\x{300}", "\x{1EC1}"));
ok($objVi->eq("e\x{302}\x{309}", "\x{1EC3}"));
ok($objVi->eq("e\x{302}\x{303}", "\x{1EC5}"));
ok($objVi->eq("e\x{302}\x{301}", "\x{1EBF}"));
ok($objVi->eq("e\x{302}\x{323}", "\x{1EC7}"));
ok($objVi->eq("E\x{302}\x{300}", "\x{1EC0}"));
ok($objVi->eq("E\x{302}\x{309}", "\x{1EC2}"));
ok($objVi->eq("E\x{302}\x{303}", "\x{1EC4}"));
ok($objVi->eq("E\x{302}\x{301}", "\x{1EBE}"));
ok($objVi->eq("E\x{302}\x{323}", "\x{1EC6}"));
ok($objVi->eq("i\x{300}", pack('U', 0xEC)));
ok($objVi->eq("i\x{309}", "\x{1EC9}"));
ok($objVi->eq("i\x{303}", "\x{129}"));
ok($objVi->eq("i\x{301}", pack('U', 0xED)));
ok($objVi->eq("i\x{323}", "\x{1ECB}"));
ok($objVi->eq("I\x{300}", pack('U', 0xCC)));
ok($objVi->eq("I\x{309}", "\x{1EC8}"));
ok($objVi->eq("I\x{303}", "\x{128}"));
ok($objVi->eq("I\x{301}", pack('U', 0xCD)));
ok($objVi->eq("I\x{323}", "\x{1ECA}"));
ok($objVi->eq("o\x{300}", pack('U', 0xF2)));
ok($objVi->eq("o\x{309}", "\x{1ECF}"));
ok($objVi->eq("o\x{303}", pack('U', 0xF5)));
ok($objVi->eq("o\x{301}", pack('U', 0xF3)));
ok($objVi->eq("o\x{323}", "\x{1ECD}"));
ok($objVi->eq("O\x{300}", pack('U', 0xD2)));
ok($objVi->eq("O\x{309}", "\x{1ECE}"));
ok($objVi->eq("O\x{303}", pack('U', 0xD5)));
ok($objVi->eq("O\x{301}", pack('U', 0xD3)));
ok($objVi->eq("O\x{323}", "\x{1ECC}"));
ok($objVi->eq("o\x{302}\x{300}", "\x{1ED3}"));
ok($objVi->eq("o\x{302}\x{309}", "\x{1ED5}"));
ok($objVi->eq("o\x{302}\x{303}", "\x{1ED7}"));
ok($objVi->eq("o\x{302}\x{301}", "\x{1ED1}"));
ok($objVi->eq("o\x{302}\x{323}", "\x{1ED9}"));
ok($objVi->eq("O\x{302}\x{300}", "\x{1ED2}"));
ok($objVi->eq("O\x{302}\x{309}", "\x{1ED4}"));
ok($objVi->eq("O\x{302}\x{303}", "\x{1ED6}"));
ok($objVi->eq("O\x{302}\x{301}", "\x{1ED0}"));
ok($objVi->eq("O\x{302}\x{323}", "\x{1ED8}"));
ok($objVi->eq("o\x{31B}\x{300}", "\x{1EDD}"));
ok($objVi->eq("o\x{31B}\x{309}", "\x{1EDF}"));
ok($objVi->eq("o\x{31B}\x{303}", "\x{1EE1}"));
ok($objVi->eq("o\x{31B}\x{301}", "\x{1EDB}"));
ok($objVi->eq("o\x{31B}\x{323}", "\x{1EE3}"));
ok($objVi->eq("O\x{31B}\x{300}", "\x{1EDC}"));
ok($objVi->eq("O\x{31B}\x{309}", "\x{1EDE}"));
ok($objVi->eq("O\x{31B}\x{303}", "\x{1EE0}"));
ok($objVi->eq("O\x{31B}\x{301}", "\x{1EDA}"));
ok($objVi->eq("O\x{31B}\x{323}", "\x{1EE2}"));
ok($objVi->eq("u\x{300}", pack('U', 0xF9)));
ok($objVi->eq("u\x{309}", "\x{1EE7}"));
ok($objVi->eq("u\x{303}", "\x{169}"));
ok($objVi->eq("u\x{301}", pack('U', 0xFA)));
ok($objVi->eq("u\x{323}", "\x{1EE5}"));
ok($objVi->eq("U\x{300}", pack('U', 0xD9)));
ok($objVi->eq("U\x{309}", "\x{1EE6}"));
ok($objVi->eq("U\x{303}", "\x{168}"));
ok($objVi->eq("U\x{301}", pack('U', 0xDA)));
ok($objVi->eq("U\x{323}", "\x{1EE4}"));
ok($objVi->eq("u\x{31B}\x{300}", "\x{1EEB}"));
ok($objVi->eq("u\x{31B}\x{309}", "\x{1EED}"));
ok($objVi->eq("u\x{31B}\x{303}", "\x{1EEF}"));
ok($objVi->eq("u\x{31B}\x{301}", "\x{1EE9}"));
ok($objVi->eq("u\x{31B}\x{323}", "\x{1EF1}"));
ok($objVi->eq("U\x{31B}\x{300}", "\x{1EEA}"));
ok($objVi->eq("U\x{31B}\x{309}", "\x{1EEC}"));
ok($objVi->eq("U\x{31B}\x{303}", "\x{1EEE}"));
ok($objVi->eq("U\x{31B}\x{301}", "\x{1EE8}"));
ok($objVi->eq("U\x{31B}\x{323}", "\x{1EF0}"));
ok($objVi->eq("y\x{300}", "\x{1EF3}"));
ok($objVi->eq("y\x{309}", "\x{1EF7}"));
ok($objVi->eq("y\x{303}", "\x{1EF9}"));
ok($objVi->eq("y\x{301}", pack('U', 0xFD)));
ok($objVi->eq("y\x{323}", "\x{1EF5}"));
ok($objVi->eq("Y\x{300}", "\x{1EF2}"));
ok($objVi->eq("Y\x{309}", "\x{1EF6}"));
ok($objVi->eq("Y\x{303}", "\x{1EF8}"));
ok($objVi->eq("Y\x{301}", pack('U', 0xDD)));
ok($objVi->eq("Y\x{323}", "\x{1EF4}"));

# 186

ok($objVi->eq("e\x{306}", "\x{115}"));
ok($objVi->eq("E\x{306}", "\x{114}"));
ok($objVi->eq("i\x{306}", "\x{12D}"));
ok($objVi->eq("I\x{306}", "\x{12C}"));
ok($objVi->eq("o\x{306}", "\x{14F}"));
ok($objVi->eq("O\x{306}", "\x{14E}"));
ok($objVi->eq("u\x{306}", "\x{16D}"));
ok($objVi->eq("U\x{306}", "\x{16C}"));

# 194