19 lines
568 B
Perl
19 lines
568 B
Perl
#!/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)],
|
|
'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+,}),
|
|
'my location is nowhere!' => undef,
|
|
);
|
|
|
|
done_testing;
|