summaryrefslogtreecommitdiff
path: root/cpan/Unicode-Collate/t/locale_fr.t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-08-02 14:56:01 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-08-02 14:57:09 +0100
commit00e0035119fd95eab851b6b1d1ef1ee164487e07 (patch)
treec45cbe5e8d622bf55116f6a69d92a87660d41460 /cpan/Unicode-Collate/t/locale_fr.t
parentade9cf977f7d471077ecd475f145b736b50e9b52 (diff)
downloadperl-00e0035119fd95eab851b6b1d1ef1ee164487e07.tar.gz
Updated Unic0de-Collate to CPAN version 0.55
[DELTA] 0.55 Sun Aug 1 21:21:23 2010 - incorporated Unicode::Collate::Locale with some changes. (see http://www.xray.mpe.mpg.de/mailing-lists/perl-unicode/2004-03/msg00030.html) ! added t/locale*.t that uses DUCET. 0.54 Sun Jul 25 21:37:04 2010 - Now UCA Revision 20 (based on Unicode 5.2.0). - DUCET is also updated (for Unicode 5.2.0) as Collate/allkeys.txt, which *is required* to test this module. ! Please notice that allkeys.txt will be overwritten if you have had other allkeys.txt already. - U+9FC4..U+9FCB and U+2A700..U+2B734 are new CJK Unified Ideographs. - Many hangul jamo are assigned (affecting hangul_terminator). ! DUCET will be compiled when XS is used. Explicit saying <table => 'allkeys.txt'> (or using another table) will prevent this module using the compiled DUCET. ! added t/default.t that uses DUCET.
Diffstat (limited to 'cpan/Unicode-Collate/t/locale_fr.t')
-rw-r--r--cpan/Unicode-Collate/t/locale_fr.t52
1 files changed, 52 insertions, 0 deletions
diff --git a/cpan/Unicode-Collate/t/locale_fr.t b/cpan/Unicode-Collate/t/locale_fr.t
new file mode 100644
index 0000000000..025d3a897f
--- /dev/null
+++ b/cpan/Unicode-Collate/t/locale_fr.t
@@ -0,0 +1,52 @@
+#!perl
+use strict;
+use warnings;
+use Unicode::Collate::Locale;
+
+use Test;
+plan tests => 28;
+
+my $objFr = Unicode::Collate::Locale->
+ new(locale => 'FR', normalization => undef);
+
+ok(1);
+ok($objFr->getlocale, 'fr');
+
+$objFr->change(level => 1);
+
+ok($objFr->eq("Æ", "AE"));
+ok($objFr->eq("æ", "ae"));
+ok($objFr->eq("\x{01FD}", "ae"));
+ok($objFr->eq("\x{01FC}", "AE"));
+ok($objFr->eq("\x{01E3}", "ae"));
+ok($objFr->eq("\x{01E2}", "AE"));
+ok($objFr->eq("\x{1D2D}", "AE"));
+
+$objFr->change(level => 2);
+
+ok($objFr->gt("Æ", "AE"));
+ok($objFr->gt("æ", "ae"));
+ok($objFr->gt("\x{01FD}", "ae"));
+ok($objFr->gt("\x{01FC}", "AE"));
+ok($objFr->gt("\x{01E3}", "ae"));
+ok($objFr->gt("\x{01E2}", "AE"));
+ok($objFr->gt("\x{1D2D}", "AE"));
+
+ok($objFr->eq("Æ\x{304}", "\x{01E2}"));
+ok($objFr->eq("æ\x{304}", "\x{01E3}"));
+ok($objFr->eq("Æ\x{301}", "\x{01FC}"));
+ok($objFr->eq("æ\x{301}", "\x{01FD}"));
+
+$objFr->change(level => 3);
+
+ok($objFr->lt("æ\x{304}", "\x{01E2}"));
+ok($objFr->eq("Æ\x{304}", "\x{01E2}"));
+ok($objFr->eq("æ\x{304}", "\x{01E3}"));
+ok($objFr->gt("Æ\x{304}", "\x{01E3}"));
+
+ok($objFr->lt("æ\x{301}", "\x{01FC}"));
+ok($objFr->eq("Æ\x{301}", "\x{01FC}"));
+ok($objFr->eq("æ\x{301}", "\x{01FD}"));
+ok($objFr->gt("Æ\x{301}", "\x{01FD}"));
+
+