This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated Unicode-Collate to CPAN version 0.76
[perl5.git] / cpan / Unicode-Collate / t / loc_sw.t
1
2 BEGIN {
3     unless ("A" eq pack('U', 0x41)) {
4         print "1..0 # Unicode::Collate " .
5             "cannot stringify a Unicode code point\n";
6         exit 0;
7     }
8     if ($ENV{PERL_CORE}) {
9         chdir('t') if -d 't';
10         @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
11     }
12 }
13
14 use Test;
15 BEGIN { plan tests => 17 };
16
17 use strict;
18 use warnings;
19 use Unicode::Collate::Locale;
20
21 ok(1);
22
23 #########################
24
25 my $objSw = Unicode::Collate::Locale->
26     new(locale => 'SW', normalization => undef);
27
28 ok($objSw->getlocale, "default"); # no tailoring since 0.74
29
30 $objSw->change(level => 1);
31
32 ok($objSw->lt("c", "ch"));
33 ok($objSw->gt("cz","ch"));
34 ok($objSw->lt("d", "dh"));
35 ok($objSw->gt("dz","dh"));
36 ok($objSw->lt("g", "gh"));
37 ok($objSw->gt("gz","gh"));
38 ok($objSw->lt("k", "kh"));
39 ok($objSw->gt("kz","kh"));
40 ok($objSw->lt("n", "ng'"));
41 ok($objSw->gt("ny","ng'"));
42 ok($objSw->gt("nz","ny"));
43 ok($objSw->lt("s", "sh"));
44 ok($objSw->gt("sz","sh"));
45 ok($objSw->lt("t", "th"));
46 ok($objSw->gt("tz","th"));
47
48 # 17