2014-07-16 19:58:38 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
2014-07-16 20:34:14 -07:00
|
|
|
zci answer_type => 'lowercase';
|
2014-10-07 00:16:39 -07:00
|
|
|
zci is_cached => 1;
|
2014-07-16 20:34:14 -07:00
|
|
|
|
2014-07-16 19:58:38 -07:00
|
|
|
ddg_goodie_test(
|
2014-10-07 00:16:39 -07:00
|
|
|
['DDG::Goodie::Lowercase'],
|
|
|
|
'lowercase foo' => test_zci(
|
|
|
|
'foo',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['foo'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'foo'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'lower case foO' => test_zci(
|
|
|
|
'foo',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['foO'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'foo'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'lowercase john Doe' => test_zci(
|
|
|
|
'john doe',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['john Doe'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'john doe'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'lowercase GitHub' => test_zci(
|
|
|
|
'github',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['GitHub'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'github'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'lower case GitHub' => test_zci(
|
|
|
|
'github',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['GitHub'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'github'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'lc GitHub' => test_zci(
|
|
|
|
'github',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['GitHub'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'github'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'strtolower GitHub' => test_zci(
|
|
|
|
'github',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['GitHub'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'github'
|
|
|
|
},
|
|
|
|
),
|
|
|
|
'tolower GitHub' => test_zci(
|
|
|
|
'github',
|
|
|
|
structured_answer => {
|
|
|
|
input => ['GitHub'],
|
|
|
|
operation => 'lowercase',
|
|
|
|
result => 'github'
|
|
|
|
},
|
|
|
|
),
|
2014-07-23 15:04:18 -07:00
|
|
|
'how to lowercase text' => undef
|
2014-07-16 19:58:38 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|