Move Unicode::Collate from ext/ to dist/
[perl.git] / cpan / Unicode-Collate / t / hangtype.t
1 BEGIN {
2     unless ("A" eq pack('U', 0x41)) {
3         print "1..0 # Unicode::Collate " .
4             "cannot stringify a Unicode code point\n";
5         exit 0;
6     }
7     if ($ENV{PERL_CORE}) {
8         chdir('t') if -d 't';
9         @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
10     }
11 }
12
13 use Test;
14 BEGIN { plan tests => 33 };
15
16 use strict;
17 use warnings;
18 use Unicode::Collate;
19
20 ok(1);
21
22 #########################
23
24 ok(Unicode::Collate::getHST(0x0000), '');
25 ok(Unicode::Collate::getHST(0x0100), '');
26 ok(Unicode::Collate::getHST(0x1000), '');
27 ok(Unicode::Collate::getHST(0x10FF), '');
28 ok(Unicode::Collate::getHST(0x1100), 'L');
29 ok(Unicode::Collate::getHST(0x1101), 'L');
30 ok(Unicode::Collate::getHST(0x1159), 'L');
31 ok(Unicode::Collate::getHST(0x115A), '');
32 ok(Unicode::Collate::getHST(0x115E), '');
33 ok(Unicode::Collate::getHST(0x115F), 'L');
34 ok(Unicode::Collate::getHST(0x1160), 'V');
35 ok(Unicode::Collate::getHST(0x1161), 'V');
36 ok(Unicode::Collate::getHST(0x11A0), 'V');
37 ok(Unicode::Collate::getHST(0x11A2), 'V');
38 ok(Unicode::Collate::getHST(0x11A3), '');
39 ok(Unicode::Collate::getHST(0x11A7), '');
40 ok(Unicode::Collate::getHST(0x11A8), 'T');
41 ok(Unicode::Collate::getHST(0x11AF), 'T');
42 ok(Unicode::Collate::getHST(0x11E0), 'T');
43 ok(Unicode::Collate::getHST(0x11F9), 'T');
44 ok(Unicode::Collate::getHST(0x11FA), '');
45 ok(Unicode::Collate::getHST(0x11FF), '');
46 ok(Unicode::Collate::getHST(0x3011), '');
47 ok(Unicode::Collate::getHST(0x11A7), '');
48 ok(Unicode::Collate::getHST(0xABFF), '');
49 ok(Unicode::Collate::getHST(0xAC00), 'LV');
50 ok(Unicode::Collate::getHST(0xAC01), 'LVT');
51 ok(Unicode::Collate::getHST(0xAC1B), 'LVT');
52 ok(Unicode::Collate::getHST(0xAC1C), 'LV');
53 ok(Unicode::Collate::getHST(0xD7A3), 'LVT');
54 ok(Unicode::Collate::getHST(0xD7A4), '');
55 ok(Unicode::Collate::getHST(0xFFFF), '');
56