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_ar.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 => 8 };
16
17 use strict;
18 use warnings;
19 use Unicode::Collate::Locale;
20
21 ok(1);
22
23 #########################
24
25 my $objAr = Unicode::Collate::Locale->
26     new(locale => 'AR', normalization => undef);
27
28 ok($objAr->getlocale, 'ar');
29
30 $objAr->change(level => 1);
31
32 ok($objAr->eq("\x{62A}", "\x{629}"));
33 ok($objAr->eq("\x{62A}", "\x{FE93}"));
34 ok($objAr->eq("\x{62A}", "\x{FE94}"));
35
36 $objAr->change(level => 3);
37
38 ok($objAr->eq("\x{62A}", "\x{629}"));
39 ok($objAr->eq("\x{62A}", "\x{FE93}"));
40 ok($objAr->eq("\x{62A}", "\x{FE94}"));
41
42 # 8