diff options
Diffstat (limited to 'lib/Net/hostent.t')
-rw-r--r-- | lib/Net/hostent.t | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Net/hostent.t b/lib/Net/hostent.t index 2616b56425..421f19dc35 100644 --- a/lib/Net/hostent.t +++ b/lib/Net/hostent.t @@ -33,6 +33,10 @@ sub DIE { use Socket; my $h = gethost('localhost'); +SKIP: { +skip "Can't resolve localhost and you don't have /etc/hosts", 6 + if (!defined($h) && !-e '/etc/hosts'); + ok(defined $h, "gethost('localhost')") || DIE("Can't continue without working gethost: $!"); @@ -89,3 +93,4 @@ SKIP: { print "# " . $h->name . " " . join (",", @{$h->aliases}) . "\n"; } } +} |