use Test::More; use utf8; use Data::Dumper; use I22r::Translate; use t::Constants; use strict; use warnings; binmode STDOUT, ':encoding(UTF-8)'; binmode STDERR, ':encoding(UTF-8)'; if (defined $DB::OUT) { # if Perl debugger is running binmode $DB::OUT, ':encoding(UTF-8)'; } ok(1, 'starting test'); t::Constants::skip_remaining_tests() unless $t::Constants::CONFIGURED; t::Constants::basic_config(); my $src = 'en'; my $dest = $ARGV[0] || 'es'; my %INPUT = ( 'entities', 'Inside <pre></pre> tags.', 'no-ent', 'Outside
tags.', 'no-ent2', 'Outside/ && $R{'no-ent'}{TEXT} =~ m!\s*pre>!,
'no entities preserves and
' )
or diag Dumper($R{"no-ent"});
ok( $R{"no-ent2"}{TEXT} !~ /&/,
'no entities in input2 => none in output' );
ok( $R{'no-ent2'}{TEXT} =~ // && $R{'no-ent2'}{TEXT} =~ m!\s*bar>!,
'no entities2 preserves and ' )
or diag Dumper($R{'no-ent2'});
ok( $R{'nbsp-no-content'}{TEXT} =~ / /,
' entity preserved in translation' );
done_testing();