#!/usr/bin/perl use warnings; use strict; use lib ('lib'); use Test::More 'no_plan'; use Petal::I18N; use Petal; eval "use Lingua::31337"; if ($@) { warn "Lingua::31337 not found - skipping"; ok (1); } else { eval "use Petal::TranslationService::h4x0r"; die $@ if ($@); $Petal::TranslationService = Petal::TranslationService::h4x0r->new(); my $xml = <
Konichiwa, Buruno-san, Kyoo wa o-genki desu ka?
EOF $xml =~ s/\s*$//; my $res = Petal::I18N->process ($xml); ok ($res =~ /Buruno/); ok ($res !~ /Konichiwa/); } 1; __END__