Locale-MO-File

 view release on metacpan or  search on metacpan

t/21_test_examples.t  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Test::More;
use Test::Differences;
use Cwd qw(getcwd chdir);
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   => '11_little_endian',
        path   => 'example',
        script => '-I../lib -T 11_little_endian.pl',
        result => <<'EOT',
$messages_result = [
  {
    msgid => '',
    msgstr => 'MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Plural-Forms: nplurals=2; plural=n != 1;
'
  },
  {
    msgctxt => 'c_context',
    msgid => 'c_o_singular',
    msgid_plural => 'c_o_plural',
    msgstr_plural => [
      'c_t_singular',
      'c_t_plural'
    ]
  },
  {
    msgctxt => 'context',
    msgid => 'c_original',
    msgstr => 'c_translated'
  },
  {
    msgid => 'o_singular',
    msgid_plural => 'o_plural',
    msgstr_plural => [
      't_singular',
      't_plural'
    ]
  },
  {
    msgid => 'original',
    msgstr => 'translated'
  }
];
EOT
    },
    {
        test   => '12_little_endian_fh',
        path   => 'example',
        script => '-I../lib -T 12_little_endian_fh.pl',
        result => <<'EOT',
$messages_result = [
  {
    msgid => '',
    msgstr => 'MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Plural-Forms: nplurals=2; plural=n != 1;



( run in 1.040 second using v1.01-cache-2.11-cpan-39bf76dae61 )