summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/lib/Unicode/UCD.t
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/perl/lib/Unicode/UCD.t')
-rw-r--r--gnu/usr.bin/perl/lib/Unicode/UCD.t24
1 files changed, 15 insertions, 9 deletions
diff --git a/gnu/usr.bin/perl/lib/Unicode/UCD.t b/gnu/usr.bin/perl/lib/Unicode/UCD.t
index 067172d1b54..c4046bcdcab 100644
--- a/gnu/usr.bin/perl/lib/Unicode/UCD.t
+++ b/gnu/usr.bin/perl/lib/Unicode/UCD.t
@@ -1,3 +1,4 @@
+#!perl -w
BEGIN {
if (ord("A") == 193) {
print "1..0 # Skip: EBCDIC\n";
@@ -6,6 +7,11 @@ BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
@INC = "::lib" if $^O eq 'MacOS'; # module parses @INC itself
+ require Config; import Config;
+ if ($Config{'extensions'} !~ /\bStorable\b/) {
+ print "1..0 # Skip: Storable was not built; Unicode::UCD uses Storable\n";
+ exit 0;
+ }
}
use strict;
@@ -164,7 +170,7 @@ is($charinfo->{upper}, '');
is($charinfo->{lower}, '');
is($charinfo->{title}, '');
is($charinfo->{block}, 'Mathematical Alphanumeric Symbols');
-is($charinfo->{script}, undef);
+is($charinfo->{script}, 'Common');
use Unicode::UCD qw(charblock charscript);
@@ -191,7 +197,7 @@ is($charinfo->{upper}, '');
is($charinfo->{lower}, '');
is($charinfo->{title}, '');
is($charinfo->{block}, 'Latin-1 Supplement');
-is($charinfo->{script}, undef);
+is($charinfo->{script}, 'Common');
use Unicode::UCD qw(charblocks charscripts);
@@ -221,8 +227,8 @@ is($charscript, 'Ethiopic');
my $ranges;
$ranges = charscript('Ogham');
-is($ranges->[0]->[0], hex('1681'), 'Ogham charscript');
-is($ranges->[0]->[1], hex('169a'));
+is($ranges->[1]->[0], hex('1681'), 'Ogham charscript');
+is($ranges->[1]->[1], hex('169a'));
use Unicode::UCD qw(charinrange);
@@ -232,7 +238,7 @@ ok( charinrange($ranges, "13a0"));
ok( charinrange($ranges, "13f4"));
ok(!charinrange($ranges, "13f5"));
-is(Unicode::UCD::UnicodeVersion, '4.0.0', 'UnicodeVersion');
+is(Unicode::UCD::UnicodeVersion, '4.0.1', 'UnicodeVersion');
use Unicode::UCD qw(compexcl);
@@ -269,12 +275,12 @@ ok($casespec->{code} eq '00DF' &&
$casespec->{lower} eq '00DF' &&
$casespec->{title} eq '0053 0073' &&
$casespec->{upper} eq '0053 0053' &&
- $casespec->{condition} eq undef, 'casespec 0xDF');
+ !defined $casespec->{condition}, 'casespec 0xDF');
$casespec = casespec(0x307);
ok($casespec->{az}->{code} eq '0307' &&
- $casespec->{az}->{lower} eq '' &&
+ !defined $casespec->{az}->{lower} &&
$casespec->{az}->{title} eq '0307' &&
$casespec->{az}->{upper} eq '0307' &&
$casespec->{az}->{condition} eq 'az After_I',
@@ -282,7 +288,7 @@ ok($casespec->{az}->{code} eq '0307' &&
# perl #7305 UnicodeCD::compexcl is weird
-for (1) {$a=compexcl $_}
+for (1) {my $a=compexcl $_}
ok(1, 'compexcl read-only $_: perl #7305');
grep {compexcl $_} %{{1=>2}};
ok(1, 'compexcl read-only hash: perl #7305');
@@ -311,4 +317,4 @@ is(Unicode::UCD::_getcode('U+123x'), undef, "_getcode(x123)");
{
is(charinfo(0xdeadbeef), undef, "[perl #23273] warnings in Unicode::UCD");
-} \ No newline at end of file
+}