summaryrefslogtreecommitdiff
path: root/cpan/Unicode-Collate/t/loc_vi.t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-02 11:18:42 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-10-02 11:18:42 +0100
commitc02ee425ec16ba1c726d4eba2a70720102f63280 (patch)
tree4408fe7e56da0347a5f25e9f823507da908c3339 /cpan/Unicode-Collate/t/loc_vi.t
parent466adc1df410fe390022a141a8189df4d4fd477b (diff)
downloadperl-c02ee425ec16ba1c726d4eba2a70720102f63280.tar.gz
Update Unicode-Collate to CPAN version 0.61
[DELTA] 0.61 Sat Oct 2 11:41:29 2010 - U::C::Locale newly supports locales: hr, ig, sq. - precomposites of e-dot-below, o-dot-below, o-tilde are tailored as well. (affected locales: et, yo) - Vietnamese (vi): added contractions for non-blocked decompositions * base + dot-below + diacritical such as "a\x{323}\x{306} etc. * base + tone + horn such as "o\x{300}\x{31B}" etc.
Diffstat (limited to 'cpan/Unicode-Collate/t/loc_vi.t')
-rw-r--r--cpan/Unicode-Collate/t/loc_vi.t99
1 files changed, 98 insertions, 1 deletions
diff --git a/cpan/Unicode-Collate/t/loc_vi.t b/cpan/Unicode-Collate/t/loc_vi.t
index 8af5154710..3b5e2ee38e 100644
--- a/cpan/Unicode-Collate/t/loc_vi.t
+++ b/cpan/Unicode-Collate/t/loc_vi.t
@@ -4,7 +4,7 @@ use warnings;
use Unicode::Collate::Locale;
use Test;
-plan tests => 194;
+plan tests => 270;
my $objVi = Unicode::Collate::Locale->
new(locale => 'VI', normalization => undef);
@@ -235,3 +235,100 @@ ok($objVi->eq("u\x{306}", "\x{16D}"));
ok($objVi->eq("U\x{306}", "\x{16C}"));
# 194
+
+ok($objVi->eq("a\x{306}\x{323}", "\x{1EA1}\x{306}"));
+ok($objVi->eq("A\x{306}\x{323}", "\x{1EA0}\x{306}"));
+ok($objVi->eq("a\x{302}\x{323}", "\x{1EA1}\x{302}"));
+ok($objVi->eq("A\x{302}\x{323}", "\x{1EA0}\x{302}"));
+ok($objVi->eq("e\x{302}\x{323}", "\x{1EB9}\x{302}"));
+ok($objVi->eq("E\x{302}\x{323}", "\x{1EB8}\x{302}"));
+ok($objVi->eq("o\x{302}\x{323}", "\x{1ECD}\x{302}"));
+ok($objVi->eq("O\x{302}\x{323}", "\x{1ECC}\x{302}"));
+ok($objVi->eq("o\x{31B}\x{300}", pack('U*', 0xF2, 0x31B)));
+ok($objVi->eq("o\x{31B}\x{309}", "\x{1ECF}\x{31B}"));
+ok($objVi->eq("o\x{31B}\x{303}", pack('U*', 0xF5, 0x31B)));
+ok($objVi->eq("o\x{31B}\x{301}", pack('U*', 0xF3, 0x31B)));
+ok($objVi->eq("o\x{31B}\x{323}", "\x{1ECD}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{300}", pack('U*', 0xD2, 0x31B)));
+ok($objVi->eq("O\x{31B}\x{309}", "\x{1ECE}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{303}", pack('U*', 0xD5, 0x31B)));
+ok($objVi->eq("O\x{31B}\x{301}", pack('U*', 0xD3, 0x31B)));
+ok($objVi->eq("O\x{31B}\x{323}", "\x{1ECC}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{300}", pack('U*', 0xF9, 0x31B)));
+ok($objVi->eq("u\x{31B}\x{309}", "\x{1EE7}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{303}", "\x{169}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{301}", pack('U*', 0xFA, 0x31B)));
+ok($objVi->eq("u\x{31B}\x{323}", "\x{1EE5}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{300}", pack('U*', 0xD9, 0x31B)));
+ok($objVi->eq("U\x{31B}\x{309}", "\x{1EE6}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{303}", "\x{168}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{301}", pack('U*', 0xDA, 0x31B)));
+ok($objVi->eq("U\x{31B}\x{323}", "\x{1EE4}\x{31B}"));
+
+# 222
+
+ok($objVi->eq("a\x{306}\x{323}", "a\x{323}\x{306}"));
+ok($objVi->eq("A\x{306}\x{323}", "A\x{323}\x{306}"));
+ok($objVi->eq("a\x{302}\x{323}", "a\x{323}\x{302}"));
+ok($objVi->eq("A\x{302}\x{323}", "A\x{323}\x{302}"));
+ok($objVi->eq("e\x{302}\x{323}", "e\x{323}\x{302}"));
+ok($objVi->eq("E\x{302}\x{323}", "E\x{323}\x{302}"));
+ok($objVi->eq("o\x{302}\x{323}", "o\x{323}\x{302}"));
+ok($objVi->eq("O\x{302}\x{323}", "O\x{323}\x{302}"));
+ok($objVi->eq("o\x{31B}\x{300}", "o\x{300}\x{31B}"));
+ok($objVi->eq("o\x{31B}\x{309}", "o\x{309}\x{31B}"));
+ok($objVi->eq("o\x{31B}\x{303}", "o\x{303}\x{31B}"));
+ok($objVi->eq("o\x{31B}\x{301}", "o\x{301}\x{31B}"));
+ok($objVi->eq("o\x{31B}\x{323}", "o\x{323}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{300}", "O\x{300}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{309}", "O\x{309}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{303}", "O\x{303}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{301}", "O\x{301}\x{31B}"));
+ok($objVi->eq("O\x{31B}\x{323}", "O\x{323}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{300}", "u\x{300}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{309}", "u\x{309}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{303}", "u\x{303}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{301}", "u\x{301}\x{31B}"));
+ok($objVi->eq("u\x{31B}\x{323}", "u\x{323}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{300}", "U\x{300}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{309}", "U\x{309}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{303}", "U\x{303}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{301}", "U\x{301}\x{31B}"));
+ok($objVi->eq("U\x{31B}\x{323}", "U\x{323}\x{31B}"));
+
+# 250
+
+$objVi->change(normalization => undef);
+
+ok($objVi->index("a\x{306}\x{323}", "a\x{323}\x{306}"), 0);
+ok($objVi->index("o\x{31B}\x{300}", "o\x{300}\x{31B}"), 0);
+ok($objVi->index("a\x{306}\x{323}", pack('U*', 0x1EA1, 0x306)), 0);
+ok($objVi->index("o\x{31B}\x{300}", pack('U*', 0x00F2, 0x31B)), 0);
+
+ok($objVi->index("A\x{306}\x{323}", "a\x{323}\x{306}"), -1);
+ok($objVi->index("O\x{31B}\x{300}", "o\x{300}\x{31B}"), -1);
+ok($objVi->index("A\x{306}\x{323}", pack('U*', 0x1EA1, 0x306)), -1);
+ok($objVi->index("O\x{31B}\x{300}", pack('U*', 0x00F2, 0x31B)), -1);
+
+# 258
+
+$objVi->change(level => 2);
+
+ok($objVi->index("A\x{306}\x{323}", "a\x{323}\x{306}"), 0);
+ok($objVi->index("O\x{31B}\x{300}", "o\x{300}\x{31B}"), 0);
+ok($objVi->index("A\x{306}\x{323}", pack('U*', 0x1EA1, 0x306)), 0);
+ok($objVi->index("O\x{31B}\x{300}", pack('U*', 0x00F2, 0x31B)), 0);
+
+ok($objVi->index("A\x{306}", "a\x{323}\x{306}"), -1);
+ok($objVi->index("O\x{31B}", "o\x{300}\x{31B}"), -1);
+ok($objVi->index("A\x{306}", pack('U*', 0x1EA1, 0x306)), -1);
+ok($objVi->index("O\x{31B}", pack('U*', 0x00F2, 0x31B)), -1);
+
+$objVi->change(level => 1);
+
+ok($objVi->index("A\x{306}", "a\x{323}\x{306}"), 0);
+ok($objVi->index("O\x{31B}", "o\x{300}\x{31B}"), 0);
+ok($objVi->index("A\x{306}", pack('U*', 0x1EA1, 0x306)), 0);
+ok($objVi->index("O\x{31B}", pack('U*', 0x00F2, 0x31B)), 0);
+
+# 270