This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor die_exit.t to loop over a list, rather than iterate on an hash.
[perl5.git] / cpan / Unicode-Collate / t / loc_af.t
CommitLineData
68adb2b0
CBW
1
2BEGIN {
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
14use Test;
15BEGIN { plan tests => 8 };
16
6484f676
CBW
17use strict;
18use warnings;
19use Unicode::Collate::Locale;
20
68adb2b0
CBW
21ok(1);
22
23#########################
6484f676
CBW
24
25my $objAf = Unicode::Collate::Locale->
26 new(locale => 'AF', normalization => undef);
27
6484f676
CBW
28ok($objAf->getlocale, 'af');
29
30$objAf->change(level => 1);
31
32ok($objAf->eq("n", "N"));
33ok($objAf->eq("N", "\x{149}"));
34
35$objAf->change(level => 2);
36
37ok($objAf->eq("n", "N"));
38ok($objAf->eq("N", "\x{149}"));
39
40$objAf->change(level => 3);
41
42ok($objAf->lt("n", "N"));
43ok($objAf->lt("N", "\x{149}"));