HTML-Template-Compiled-Plugin-I18N
view release on metacpan or search on metacpan
t/31_test_examples.t view on Meta::CPAN
#!perl
use strict;
use warnings;
use Test::More;
use Test::Differences;
use Cwd qw(getcwd chdir);
$ENV{TEST_EXAMPLE} or plan(
skip_all => 'Set $ENV{TEST_EXAMPLE} to run this test.'
);
plan(tests => 3);
my @data = (
{
test => 'using default translator',
path => 'example',
script => 'using_default_translator.pl',
result => <<'EOT',
text=foo & bar
EOT
},
{
test => 'Locale-Maketext',
path => 'example/Locale-Maketext',
script => 'example.pl',
result => <<'EOT',
* placeholder
Steffen is programming <Perl>.
* placeholder and escape
Steffen is programming <Perl>.
* unescaped placeholder
This is the <a href=http://www.perl.org/><link></a>.
* placeholder
Steffen programmiert <Perl>.
* placeholder and escape
Steffen programmiert <Perl>.
* unescaped placeholder
Das ist der <a href=http://www.perl.org/><Link></a>.
EOT
},
{
test => 'Locale-TextDomain',
path => 'example/Locale-TextDomain',
script => 'example.pl',
result => <<'EOT',
* placeholder
Steffen is programming <Perl>.
* placeholder and escape
Steffen is programming <Perl>.
* unescaped placeholder
This is the <a href=http://www.perl.org/><link></a>.
* no context
No context.
* context
Has context.
* plural
shelf
shelves
* context and plural
good shelf<>
good shelve<s>
( run in 1.237 second using v1.01-cache-2.11-cpan-39bf76dae61 )