diff options
author | SADAHIRO Tomoyuki <BQW10602@nifty.com> | 2001-12-17 06:22:12 +0900 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-16 14:49:18 +0000 |
commit | 905aa9f0848ed318032cdb14109ace09a223b727 (patch) | |
tree | 362d17720b1dbaf5a222db32dd17f2b1447276c7 /lib/Unicode/Collate/t/test.t | |
parent | 4ef28c72ed49aa6b9d3f54cb581962eceee8c546 (diff) | |
download | perl-905aa9f0848ed318032cdb14109ace09a223b727.tar.gz |
[patch @13687] Unicode::Collate 0.10
Message-Id: <20011216211615.8ED5.BQW10602@nifty.com>
p4raw-id: //depot/perl@13720
Diffstat (limited to 'lib/Unicode/Collate/t/test.t')
-rw-r--r-- | lib/Unicode/Collate/t/test.t | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/Unicode/Collate/t/test.t b/lib/Unicode/Collate/t/test.t index 48bf412857..d9ee1fe2e3 100644 --- a/lib/Unicode/Collate/t/test.t +++ b/lib/Unicode/Collate/t/test.t @@ -4,7 +4,7 @@ ######################### use Test; -BEGIN { plan tests => 50 }; +BEGIN { plan tests => 54 }; use Unicode::Collate; ok(1); # If we made it this far, we're ok. @@ -42,11 +42,32 @@ eval "use Unicode::Normalize"; if(!$@){ my $NFD = Unicode::Collate->new( table => 'keys.txt', + entry => <<'ENTRIES', +0430 ; [.0B01.0020.0002.0430] # CYRILLIC SMALL LETTER A +0410 ; [.0B01.0020.0008.0410] # CYRILLIC CAPITAL LETTER A +04D3 ; [.0B09.0020.0002.04D3] # CYRILLIC SMALL LETTER A WITH DIAERESIS +0430 0308 ; [.0B09.0020.0002.04D3] # CYRILLIC SMALL LETTER A WITH DIAERESIS +04D3 ; [.0B09.0020.0002.04D3] # CYRILLIC SMALL LETTER A WITH DIAERESIS +0430 0308 ; [.0B09.0020.0002.04D3] # CYRILLIC SMALL LETTER A WITH DIAERESIS +04D2 ; [.0B09.0020.0008.04D2] # CYRILLIC CAPITAL LETTER A WITH DIAERESIS +0410 0308 ; [.0B09.0020.0008.04D2] # CYRILLIC CAPITAL LETTER A WITH DIAERESIS +0430 3099 ; [.0B10.0020.0002.04D3] # A WITH KATAKANA VOICED +0430 3099 0308 ; [.0B11.0020.0002.04D3] # A WITH KATAKANA VOICED, DIAERESIS +ENTRIES ); - ok($NFD->cmp("A$acute", $A_acute), 0); + ok($NFD->eq("A$acute", $A_acute)); + ok($NFD->eq("\x{4D3}\x{325}", "\x{430}\x{308}\x{325}")); + ok($NFD->lt("\x{430}\x{308}A", "\x{430}\x{308}B")); + ok($NFD->lt("\x{430}\x{3099}B", "\x{430}\x{308}\x{3099}A")); + ok($NFD->eq("\x{0430}\x{3099}\x{309A}\x{0308}", + "\x{0430}\x{309A}\x{3099}\x{0308}") ); } else{ ok(1); + ok(1); + ok(1); + ok(1); + ok(1); } my $tr = Unicode::Collate->new( |