diff options
author | Karl Williamson <public@khwilliamson.com> | 2011-08-29 09:15:52 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2011-09-03 17:01:15 -0600 |
commit | 7fcb6f686bc21e949bd8aed25e534a1b1711da92 (patch) | |
tree | cd6d93c08ca8bb83199847eaf5a2e0f8e4abec11 /lib/Unicode | |
parent | 807807b755f89001385a00934f7e5fd6c42ec6ea (diff) | |
download | perl-7fcb6f686bc21e949bd8aed25e534a1b1711da92.tar.gz |
UCD.t: Add tests for sped-up lookups
This adds some tests for commit 5c3b35c95645d687026b198c24e884914bfb6ce6
Diffstat (limited to 'lib/Unicode')
-rw-r--r-- | lib/Unicode/UCD.t | 46 |
1 files changed, 45 insertions, 1 deletions
diff --git a/lib/Unicode/UCD.t b/lib/Unicode/UCD.t index 9c57f384d1..1dc7efe38a 100644 --- a/lib/Unicode/UCD.t +++ b/lib/Unicode/UCD.t @@ -17,7 +17,7 @@ use strict; use Unicode::UCD; use Test::More; -BEGIN { plan tests => 271 }; +BEGIN { plan tests => 305 }; use Unicode::UCD 'charinfo'; @@ -241,6 +241,50 @@ is($charinfo->{title}, ''); is($charinfo->{block}, 'Latin-1 Supplement'); is($charinfo->{script}, 'Common'); +# This is to test a case where both simple and full lowercases exist and +# differ +$charinfo = charinfo(0x130); + +is($charinfo->{code}, '0130', 'LATIN CAPITAL LETTER I WITH DOT ABOVE'); +is($charinfo->{name}, 'LATIN CAPITAL LETTER I WITH DOT ABOVE'); +is($charinfo->{category}, 'Lu'); +is($charinfo->{combining}, '0'); +is($charinfo->{bidi}, 'L'); +is($charinfo->{decomposition}, '0049 0307'); +is($charinfo->{decimal}, ''); +is($charinfo->{digit}, ''); +is($charinfo->{numeric}, ''); +is($charinfo->{mirrored}, 'N'); +is($charinfo->{unicode10}, 'LATIN CAPITAL LETTER I DOT'); +is($charinfo->{comment}, ''); +is($charinfo->{upper}, ''); +is($charinfo->{lower}, '0069'); +is($charinfo->{title}, ''); +is($charinfo->{block}, 'Latin Extended-A'); +is($charinfo->{script}, 'Latin'); + +# This is to test a case where both simple and full uppercases exist and +# differ +$charinfo = charinfo(0x1F80); + +is($charinfo->{code}, '1F80', 'GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI'); +is($charinfo->{name}, 'GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI'); +is($charinfo->{category}, 'Ll'); +is($charinfo->{combining}, '0'); +is($charinfo->{bidi}, 'L'); +is($charinfo->{decomposition}, '1F00 0345'); +is($charinfo->{decimal}, ''); +is($charinfo->{digit}, ''); +is($charinfo->{numeric}, ''); +is($charinfo->{mirrored}, 'N'); +is($charinfo->{unicode10}, ''); +is($charinfo->{comment}, ''); +is($charinfo->{upper}, '1F88'); +is($charinfo->{lower}, ''); +is($charinfo->{title}, '1F88'); +is($charinfo->{block}, 'Greek Extended'); +is($charinfo->{script}, 'Greek'); + use Unicode::UCD qw(charblocks charscripts); my $charblocks = charblocks(); |