zeroclickinfo-goodies/t/PhoneAlphabet.t

64 lines
1.5 KiB
Perl
Raw Normal View History

#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::Deep;
use DDG::Test::Goodie;
zci answer_type => "phone_alphabet";
2015-01-29 12:45:50 -08:00
zci is_cached => 1;
ddg_goodie_test(
[qw( DDG::Goodie::PhoneAlphabet )],
'1-800-LAWYR-UP to digits' => test_zci(
2015-01-29 12:45:50 -08:00
'Phone Number: 1-800-52997-87',
structured_answer => {
input => ['1-800-LAWYR-UP'],
operation => 'Phone Number',
2015-01-29 12:45:50 -08:00
result => '1-800-52997-87'
}
),
'1-800-fun-hack to phone number' => test_zci(
'Phone Number: 1-800-386-4225',
structured_answer => {
input => ['1-800-fun-hack'],
operation => 'Phone Number',
result => '1-800-386-4225'
}
),
'1-800-fun-hack to numbers' => test_zci(
'Phone Number: 1-800-386-4225',
structured_answer => {
input => ['1-800-fun-hack'],
operation => 'Phone Number',
result => '1-800-386-4225'
}
),
'1958funhack to phone' => test_zci(
2015-01-29 12:45:50 -08:00
'Phone Number: 19583864225',
structured_answer => {
input => ['1958funhack'],
operation => 'Phone Number',
result => '19583864225'
}
),
'13TAXI to phone' => test_zci(
2015-01-29 12:45:50 -08:00
'Phone Number: 138294',
structured_answer => {
input => ['13TAXI'],
operation => 'Phone Number',
result => '138294'
}
),
'something fun to hack to phone' => undef,
'0x0123 to digits' => undef
);
2016-05-16 06:18:04 -07:00
done_testing;