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-02-26 16:17:34 -08:00
|
|
|
'where am I?' => test_zci(qr/^You appear to be in [A-Z]\w+, .+\(Lat: -?\d+\.\d+, Lon: -?\d+\.\d+\)\./, html => qr{^You appear to be in [A-Z]\w+,}),
|
|
|
|
'my location' => test_zci(qr/^You appear to be in [A-Z]\w+, .+\(Lat: -?\d+\.\d+, Lon: -?\d+\.\d+\)\./, html => qr{^You appear to be in [A-Z]\w+,}),
|
2014-01-30 08:26:29 -08:00
|
|
|
'my location is nowhere!' => undef,
|
|
|
|
);
|
|
|
|
|
|
|
|
done_testing;
|