zeroclickinfo-goodies/t/Atbash.t

96 lines
2.3 KiB
Perl
Raw Normal View History

#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'atbash';
2014-10-09 06:26:55 -07:00
zci is_cached => 1;
ddg_goodie_test(
2014-10-09 06:26:55 -07:00
[qw( DDG::Goodie::Atbash )],
'atbash test' => test_zci(
'Atbash: gvhg',
structured_answer => {
data => {
title => "gvhg",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: test"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
'atbash This is a test' => test_zci(
'Atbash: Gsrh rh z gvhg',
structured_answer => {
data => {
title => "Gsrh rh z gvhg",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: This is a test"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
"atbash Gonna party like it's 1999!" => test_zci(
"Atbash: Tlmmz kzigb orpv rg'h 1999!",
2014-10-09 06:26:55 -07:00
structured_answer => {
data => {
title => "Tlmmz kzigb orpv rg'h 1999!",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: Gonna party like it's 1999!"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
'Atbash abcdefghijklmnopqrstuvwxyz' => test_zci(
2014-10-09 06:26:55 -07:00
'Atbash: zyxwvutsrqponmlkjihgfedcba',
structured_answer => {
data => {
title => "zyxwvutsrqponmlkjihgfedcba",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: abcdefghijklmnopqrstuvwxyz"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
'atbash hello' => test_zci(
'Atbash: svool',
structured_answer => {
data => {
title => "svool",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: hello"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
'atbash svool' => test_zci(
'Atbash: hello',
structured_answer => {
data => {
title => "hello",
2016-02-01 20:31:29 -08:00
subtitle => "Atbash: svool"
},
templates => {
group => 'text',
moreAt => 0
}
}
2014-10-09 06:26:55 -07:00
),
);
done_testing;