zeroclickinfo-goodies/t/WhereAmI.t

19 lines
568 B
Perl
Raw Normal View History

2014-01-30 08:26:29 -08:00
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use DDG::Test::Goodie;
zci answer_type => 'whereami';
zci is_cached => 0;
ddg_goodie_test(
[qw(DDG::Goodie::WhereAmI)],
2014-03-02 14:21:08 -08:00
'where am I?' => test_zci(qr/^You appear to be near [A-Z]\w+, .+\(Lat: -?\d+\.\d+, Lon: -?\d+\.\d+\)\./, html => qr{^You appear to be near [A-Z]\w+,}),
'my location' => test_zci(qr/^You appear to be near [A-Z]\w+, .+\(Lat: -?\d+\.\d+, Lon: -?\d+\.\d+\)\./, html => qr{^You appear to be near [A-Z]\w+,}),
2014-01-30 08:26:29 -08:00
'my location is nowhere!' => undef,
);
done_testing;