2012-03-20 16:07:12 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2014-06-15 02:57:34 -07:00
|
|
|
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'],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Uppercase',
|
2014-10-07 00:24:08 -07:00
|
|
|
result => 'THIS'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'uppercase that' => test_zci(
|
|
|
|
'THAT',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['that'],
|
2015-01-09 00:46:54 -08:00
|
|
|
operation => 'Uppercase',
|
2014-10-07 00:24:08 -07:00
|
|
|
result => 'THAT'
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'allcaps this string' => test_zci(
|
|
|
|
'THIS STRING',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['this string'],
|
2015-01-09 00:46:54 -08:00
|
|
|
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,
|
2012-03-20 16:07:12 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|