use Unicode::UCD;
use Test::More;
-BEGIN { plan tests => 179 };
+BEGIN { plan tests => 188 };
use Unicode::UCD 'charinfo';
ok( charinrange($ranges, "13f4"));
ok(!charinrange($ranges, "13f5"));
-is(Unicode::UCD::UnicodeVersion, '4.0.1', 'UnicodeVersion');
+is(Unicode::UCD::UnicodeVersion, '4.1.0', 'UnicodeVersion');
use Unicode::UCD qw(compexcl);
$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',
# 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');
{
my $r1 = charscript('Latin');
my $n1 = @$r1;
- is($n1, 26, "26 ranges in Latin script (Unicode 4.0.0)");
+ is($n1, 29, "29 ranges in Latin script (Unicode 4.1.0)");
shift @$r1 while @$r1;
my $r2 = charscript('Latin');
is(@$r2, $n1, "modifying results should not mess up internal caches");
{
is(charinfo(0xdeadbeef), undef, "[perl #23273] warnings in Unicode::UCD");
-}
\ No newline at end of file
+}
+
+use Unicode::UCD qw(namedseq);
+
+is(namedseq("KATAKANA LETTER AINU P"), "\x{31F7}\x{309A}", "namedseq");
+is(namedseq("KATAKANA LETTER AINU Q"), undef);
+is(namedseq(), undef);
+is(namedseq(qw(foo bar)), undef);
+my @ns = namedseq("KATAKANA LETTER AINU P");
+is(scalar @ns, 2);
+is($ns[0], 0x31F7);
+is($ns[1], 0x309A);
+my %ns = namedseq();
+is($ns{"KATAKANA LETTER AINU P"}, "\x{31F7}\x{309A}");
+@ns = namedseq(42);
+is(@ns, 0);
+