zeroclickinfo-goodies/t/Uppercase.t

44 lines
1007 B
Perl
Raw Normal View History

2012-03-20 16:07:12 -07:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'uppercase';
2014-10-07 00:24:08 -07:00
zci is_cached => 1;
2012-03-20 16:07:12 -07:00
ddg_goodie_test(
2014-10-07 00:24:08 -07:00
[qw( DDG::Goodie::Uppercase)],
'upper case this' => test_zci(
'THIS',
structured_answer => {
input => ['this'],
operation => 'Uppercase',
2014-10-07 00:24:08 -07:00
result => 'THIS'
}
),
'uppercase that' => test_zci(
'THAT',
structured_answer => {
input => ['that'],
operation => 'Uppercase',
2014-10-07 00:24:08 -07:00
result => 'THAT'
}
),
'allcaps this string' => test_zci(
'THIS STRING',
structured_answer => {
input => ['this string'],
operation => 'Uppercase',
2014-10-07 00:24:08 -07:00
result => 'THIS STRING'
}
),
'that string all caps' => undef,
2014-07-23 15:04:18 -07:00
'is this uppercase, sir?' => undef,
'uppercase HELLO' => undef,
'uppercase 123' => undef
2012-03-20 16:07:12 -07:00
);
done_testing;