Locale-TextDomain-OO
view release on metacpan or search on metacpan
t/52_test_examples_utf-8.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use utf8;
use Test::More;
use Test::Differences;
use Cwd qw(getcwd chdir);
use Encode qw(decode_utf8);
use English qw(-no_match_vars $CHILD_ERROR);
$ENV{AUTHOR_TESTING}
or plan skip_all => 'Set $ENV{AUTHOR_TESTING} to run this test.';
my @data = (
{
test => '04_lexicon_store_JSON_utf-8',
path => 'example',
script => '-I../lib -T 04_lexicon_store_JSON_utf-8.pl',
result => <<'EOT',
Lexicon "en-gb:cat:dom" loaded from hash.
{"en-gb:cat:dom":{"":{"charset":"UTF-8","nplurals":1,"plural":"n != 1"},"date for GBP{PLURAL_SEPARATOR}dates for GBP{MSG_KEY_SEPARATOR}appointment":{"msgstr":["date for £","dates for £"]}},"i-default::":{"":{"nplurals":2,"plural":"n != 1"}}}
var localeTextDomainOOLexicon = {"en-gb:cat:dom":{"":{"charset":"UTF-8","nplurals":1,"plural":"n != 1"},"date for GBP{PLURAL_SEPARATOR}dates for GBP{MSG_KEY_SEPARATOR}appointment":{"msgstr":["date for £","dates for £"]}},"i-default::":{"":{"nplural...
<script type="text/javascript"><!--
var localeTextDomainOOLexicon = {"en-gb:cat:dom":{"":{"charset":"UTF-8","nplurals":1,"plural":"n != 1"},"date for GBP{PLURAL_SEPARATOR}dates for GBP{MSG_KEY_SEPARATOR}appointment":{"msgstr":["date for £","dates for £"]}},"i-default::":{"":{"nplural...
--></script>
EOT
},
{
test => '04_merge_move_copy_delete_lexicon_utf-8',
path => 'example',
script => '-I../lib -T 04_merge_move_copy_delete_lexicon_utf-8.pl',
result => <<'EOT',
Lexicon "en-gb:cat:dom" loaded from hash.
Lexicon "i-default::" copied to "i-default:cat:dom".
Lexicon "i-default::", "en-gb:cat:dom" merged to "en:cat:dom".
Lexicon "i-default::" deleted.
Lexicon "i-default:cat:dom" moved to "i-default::dom".
{
"en-gb:cat:dom" => {
"" => {
charset => "UTF-8",
nplurals => 1,
plural => "n != 1",
plural_code => sub { "DUMMY" }
},
"date for GBP/0dates for GBP/4appointment" => {
msgstr => [
"date for /x{a3}",
"dates for /x{a3}"
]
}
},
"en:cat:dom" => {
"" => {
charset => "UTF-8",
nplurals => 1,
plural => "n != 1",
plural_code => sub { "DUMMY" }
},
"date for GBP/0dates for GBP/4appointment" => {
msgstr => [
"date for /x{a3}",
"dates for /x{a3}"
]
( run in 0.960 second using v1.01-cache-2.11-cpan-39bf76dae61 )