2014-04-19 21:19:26 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
2016-05-16 06:07:57 -07:00
|
|
|
use Test::Deep;
|
2014-04-19 21:19:26 -07:00
|
|
|
use DDG::Test::Goodie;
|
|
|
|
|
|
|
|
zci answer_type => "public_dns";
|
|
|
|
zci is_cached => 1;
|
|
|
|
|
|
|
|
# We don't want to test too specifically on the included data, so just confirm
|
|
|
|
# we got an answer with something approaching the correct form.
|
|
|
|
# Hopefully, some one has eyeballed the output to make sure its got the right data.
|
2016-05-16 06:07:57 -07:00
|
|
|
my $text_table = re(qr#^\+-+.*-+\+#m);
|
2014-04-19 21:19:26 -07:00
|
|
|
|
2014-04-26 19:15:21 -07:00
|
|
|
ddg_goodie_test([qw( DDG::Goodie::PublicDNS)],
|
2015-12-09 10:59:10 -08:00
|
|
|
'public dns' => test_zci(
|
|
|
|
$text_table,
|
|
|
|
structured_answer => {
|
2016-05-16 06:07:57 -07:00
|
|
|
data => ignore(),
|
2015-12-09 10:59:10 -08:00
|
|
|
templates => {
|
|
|
|
group => 'list',
|
|
|
|
options => {
|
|
|
|
list_content => 'DDH.public_dns.content',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
),
|
|
|
|
'dns servers' => test_zci(
|
|
|
|
$text_table,
|
|
|
|
structured_answer => {
|
2016-05-16 06:07:57 -07:00
|
|
|
data => ignore(),
|
2015-12-09 10:59:10 -08:00
|
|
|
templates => {
|
|
|
|
group => 'list',
|
|
|
|
options => {
|
|
|
|
list_content => 'DDH.public_dns.content',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
);
|
2014-04-19 21:19:26 -07:00
|
|
|
|
2016-05-16 06:18:04 -07:00
|
|
|
done_testing;
|