2014-04-19 21:19:26 -07:00
|
|
|
#!/usr/bin/env perl
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use Test::More;
|
|
|
|
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.
|
|
|
|
my $text_table = qr#^\+-+.*-+\+#m;
|
|
|
|
my $html_table = qr#<table class="publicdns">.*</table>$#m;
|
2014-04-26 19:15:21 -07:00
|
|
|
my $heading = 'Public DNS Servers';
|
2014-04-19 21:19:26 -07:00
|
|
|
|
2014-04-26 19:15:21 -07:00
|
|
|
ddg_goodie_test([qw( DDG::Goodie::PublicDNS)],
|
|
|
|
map { ("$_" => test_zci($text_table, html => $html_table, heading => $heading,)) } ('public dns', 'dns servers',));
|
2014-04-19 21:19:26 -07:00
|
|
|
|
|
|
|
done_testing;
|