~ubuntu-branches/ubuntu/saucy/libunicode-collate-perl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/hangtype.t

  • Committer: Bazaar Package Importer
  • Author(s): Danai SAE-HAN (韓達耐)
  • Date: 2010-11-04 21:58:23 UTC
  • Revision ID: james.westby@ubuntu.com-20101104215823-wr6wrwudp0em3fm4
Tags: upstream-0.66
Import upstream version 0.66

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 => 70 };
 
15
 
 
16
use strict;
 
17
use warnings;
 
18
use Unicode::Collate;
 
19
 
 
20
ok(1);
 
21
 
 
22
##### 2..35
 
23
ok(Unicode::Collate::getHST(0x0000), '');
 
24
ok(Unicode::Collate::getHST(0x0100), '');
 
25
ok(Unicode::Collate::getHST(0x1000), '');
 
26
ok(Unicode::Collate::getHST(0x10FF), '');
 
27
ok(Unicode::Collate::getHST(0x1100), 'L');
 
28
ok(Unicode::Collate::getHST(0x1101), 'L');
 
29
ok(Unicode::Collate::getHST(0x1159), 'L');
 
30
ok(Unicode::Collate::getHST(0x115A), '');
 
31
ok(Unicode::Collate::getHST(0x115A, 18), '');
 
32
ok(Unicode::Collate::getHST(0x115A, 20), 'L');
 
33
ok(Unicode::Collate::getHST(0x115E), '');
 
34
ok(Unicode::Collate::getHST(0x115E, 18), '');
 
35
ok(Unicode::Collate::getHST(0x115E, 20), 'L');
 
36
ok(Unicode::Collate::getHST(0x115F), 'L');
 
37
ok(Unicode::Collate::getHST(0x1160), 'V');
 
38
ok(Unicode::Collate::getHST(0x1161), 'V');
 
39
ok(Unicode::Collate::getHST(0x11A0), 'V');
 
40
ok(Unicode::Collate::getHST(0x11A2), 'V');
 
41
ok(Unicode::Collate::getHST(0x11A3), '');
 
42
ok(Unicode::Collate::getHST(0x11A3, 18), '');
 
43
ok(Unicode::Collate::getHST(0x11A3, 20), 'V');
 
44
ok(Unicode::Collate::getHST(0x11A7), '');
 
45
ok(Unicode::Collate::getHST(0x11A7, 18), '');
 
46
ok(Unicode::Collate::getHST(0x11A7, 20), 'V');
 
47
ok(Unicode::Collate::getHST(0x11A8), 'T');
 
48
ok(Unicode::Collate::getHST(0x11AF), 'T');
 
49
ok(Unicode::Collate::getHST(0x11E0), 'T');
 
50
ok(Unicode::Collate::getHST(0x11F9), 'T');
 
51
ok(Unicode::Collate::getHST(0x11FA), '');
 
52
ok(Unicode::Collate::getHST(0x11FA, 18), '');
 
53
ok(Unicode::Collate::getHST(0x11FA, 20), 'T');
 
54
ok(Unicode::Collate::getHST(0x11FF), '');
 
55
ok(Unicode::Collate::getHST(0x11FF, 18), '');
 
56
ok(Unicode::Collate::getHST(0x11FF, 20), 'T');
 
57
 
 
58
##### 36..44
 
59
ok(Unicode::Collate::getHST(0x3011), '');
 
60
ok(Unicode::Collate::getHST(0xABFF), '');
 
61
ok(Unicode::Collate::getHST(0xAC00), 'LV');
 
62
ok(Unicode::Collate::getHST(0xAC01), 'LVT');
 
63
ok(Unicode::Collate::getHST(0xAC1B), 'LVT');
 
64
ok(Unicode::Collate::getHST(0xAC1C), 'LV');
 
65
ok(Unicode::Collate::getHST(0xD7A3), 'LVT');
 
66
ok(Unicode::Collate::getHST(0xD7A4), '');
 
67
ok(Unicode::Collate::getHST(0xFFFF), '');
 
68
 
 
69
##### 45..57
 
70
ok(Unicode::Collate::getHST(0xA960, 18), '');
 
71
ok(Unicode::Collate::getHST(0xA961, 18), '');
 
72
ok(Unicode::Collate::getHST(0xA97C, 18), '');
 
73
ok(Unicode::Collate::getHST(0xD7B0, 18), '');
 
74
ok(Unicode::Collate::getHST(0xD7C0, 18), '');
 
75
ok(Unicode::Collate::getHST(0xD7C6, 18), '');
 
76
ok(Unicode::Collate::getHST(0xD7C7, 18), '');
 
77
ok(Unicode::Collate::getHST(0xD7CA, 18), '');
 
78
ok(Unicode::Collate::getHST(0xD7CB, 18), '');
 
79
ok(Unicode::Collate::getHST(0xD7DD, 18), '');
 
80
ok(Unicode::Collate::getHST(0xD7FB, 18), '');
 
81
ok(Unicode::Collate::getHST(0xD7FC, 18), '');
 
82
ok(Unicode::Collate::getHST(0xD7FF, 18), '');
 
83
 
 
84
##### 58..70
 
85
ok(Unicode::Collate::getHST(0xA960, 20), 'L');
 
86
ok(Unicode::Collate::getHST(0xA961, 20), 'L');
 
87
ok(Unicode::Collate::getHST(0xA97C, 20), 'L');
 
88
ok(Unicode::Collate::getHST(0xD7B0, 20), 'V');
 
89
ok(Unicode::Collate::getHST(0xD7C0, 20), 'V');
 
90
ok(Unicode::Collate::getHST(0xD7C6, 20), 'V');
 
91
ok(Unicode::Collate::getHST(0xD7C7, 20), '');
 
92
ok(Unicode::Collate::getHST(0xD7CA, 20), '');
 
93
ok(Unicode::Collate::getHST(0xD7CB, 20), 'T');
 
94
ok(Unicode::Collate::getHST(0xD7DD, 20), 'T');
 
95
ok(Unicode::Collate::getHST(0xD7FB, 20), 'T');
 
96
ok(Unicode::Collate::getHST(0xD7FC, 20), '');
 
97
ok(Unicode::Collate::getHST(0xD7FF, 20), '');