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_nb.t
index 0aba134..4de166a 100644 (file)
@@ -1,10 +1,26 @@
-#!perl
+
+BEGIN {
+    unless ("A" eq pack('U', 0x41)) {
+       print "1..0 # Unicode::Collate " .
+           "cannot stringify a Unicode code point\n";
+       exit 0;
+    }
+    if ($ENV{PERL_CORE}) {
+       chdir('t') if -d 't';
+       @INC = $^O eq 'MacOS' ? qw(::lib) : qw(../lib);
+    }
+}
+
+use Test;
+BEGIN { plan tests => 95 };
+
 use strict;
 use warnings;
 use Unicode::Collate::Locale;
 
-use Test;
-plan tests => 95;
+ok(1);
+
+#########################
 
 my $eth  = pack 'U', 0xF0;
 my $ETH  = pack 'U', 0xD0;
@@ -26,7 +42,6 @@ my $Arng = pack 'U', 0xC5;
 my $objNb = Unicode::Collate::Locale->
     new(locale => 'NB', normalization => undef);
 
-ok(1);
 ok($objNb->getlocale, 'nb');
 
 $objNb->change(level => 1);
@@ -34,7 +49,7 @@ $objNb->change(level => 1);
 ok($objNb->lt('z', $ae));
 ok($objNb->lt($ae, $ostk));
 ok($objNb->lt($ostk, $arng));
-ok($objNb->lt($arng, "\x{292}"));
+ok($objNb->lt($arng, "\x{1C0}"));
 
 # 6