This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Unicode-Collate to CPAN version 0.67
[perl5.git] / cpan / Unicode-Collate / t / loc_hy.t
1 #!perl
2 use strict;
3 use warnings;
4 use Unicode::Collate::Locale;
5
6 use Test;
7 plan tests => 13;
8
9 my $objHy = Unicode::Collate::Locale->
10     new(locale => 'HY', normalization => undef);
11
12 ok(1);
13 ok($objHy->getlocale, 'hy');
14
15 $objHy->change(level => 1);
16
17 ok($objHy->lt("\x{584}", "\x{587}"));
18 ok($objHy->gt("\x{585}", "\x{587}"));
19
20 ok($objHy->lt("\x{584}\x{4E00}",  "\x{587}"));
21 ok($objHy->lt("\x{584}\x{20000}", "\x{587}"));
22 ok($objHy->lt("\x{584}\x{10FFFD}","\x{587}"));
23
24 # 7
25
26 $objHy->change(level => 2);
27
28 ok($objHy->eq("\x{587}", "\x{535}\x{582}"));
29
30 $objHy->change(level => 3);
31
32 ok($objHy->lt("\x{587}", "\x{535}\x{582}"));
33
34 $objHy->change(upper_before_lower => 1);
35
36 ok($objHy->gt("\x{587}", "\x{535}\x{582}"));
37
38 # 10
39
40 $objHy->change(UCA_Version => 8);
41
42 ok($objHy->lt("\x{584}\x{4E00}",  "\x{587}"));
43 ok($objHy->lt("\x{584}\x{20000}", "\x{587}"));
44 ok($objHy->lt("\x{584}\x{10FFFD}","\x{587}"));
45
46 # 13