2012-06-26 11:31:51 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2012-07-05 17:20:02 -07:00
|
|
|
zci answer_type => 'translation';
|
2014-10-14 09:45:42 -07:00
|
|
|
zci is_cached => 1;
|
2012-06-26 11:31:51 -07:00
|
|
|
|
|
|
|
ddg_goodie_test(
|
2014-10-14 09:45:42 -07:00
|
|
|
[qw( DDG::Goodie::PigLatin )],
|
|
|
|
'pig latin will this work?' => test_zci(
|
|
|
|
'Pig Latin: illway isthay orkway?',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['will this work?'],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Translate to Pig Latin',
|
2014-10-14 09:45:42 -07:00
|
|
|
result => 'illway isthay orkway?'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'piglatin i love duckduckgo' => test_zci(
|
|
|
|
'Pig Latin: iway ovelay uckduckgoday',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['i love duckduckgo'],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Translate to Pig Latin',
|
2014-10-14 09:45:42 -07:00
|
|
|
result => 'iway ovelay uckduckgoday'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'pig latin i love duckduckgo' => test_zci(
|
|
|
|
'Pig Latin: iway ovelay uckduckgoday',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['i love duckduckgo'],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Translate to Pig Latin',
|
2014-10-14 09:45:42 -07:00
|
|
|
result => 'iway ovelay uckduckgoday'
|
|
|
|
}
|
|
|
|
),
|
2015-12-27 09:36:11 -08:00
|
|
|
'pig latin' => undef,
|
|
|
|
'piglatin' => undef,
|
2012-06-26 11:31:51 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|