summaryrefslogtreecommitdiff
path: root/dist/Net-Ping
diff options
context:
space:
mode:
authorRichard Leach <rich+perl@hyphen-dash-hyphen.info>2019-05-19 03:34:38 +0000
committerKarl Williamson <khw@cpan.org>2019-06-25 12:40:06 -0600
commit3167cd977ff2111c94c27b02b916ed58e14f281f (patch)
treebafed5bd72d0995e91a2cf42fd2419817527e934 /dist/Net-Ping
parentf1d63d3c9399eb3b51a808574f055fa1b2b57979 (diff)
downloadperl-3167cd977ff2111c94c27b02b916ed58e14f281f.tar.gz
Additional Net-Ping tests skip if d_getpbyname is undef
Diffstat (limited to 'dist/Net-Ping')
-rw-r--r--dist/Net-Ping/t/001_new.t5
-rw-r--r--dist/Net-Ping/t/010_pingecho.t5
2 files changed, 10 insertions, 0 deletions
diff --git a/dist/Net-Ping/t/001_new.t b/dist/Net-Ping/t/001_new.t
index 6b097d70a8..46965b7b05 100644
--- a/dist/Net-Ping/t/001_new.t
+++ b/dist/Net-Ping/t/001_new.t
@@ -1,11 +1,16 @@
use warnings;
use strict;
+use Config;
BEGIN {
unless (my $port = getservbyname('echo', 'tcp')) {
print "1..0 \# Skip: no echo port\n";
exit;
}
+ unless ($Config{d_getpbyname}) {
+ print "1..0 \# Skip: no getprotobyname\n";
+ exit;
+ }
}
use Test::More qw(no_plan);
diff --git a/dist/Net-Ping/t/010_pingecho.t b/dist/Net-Ping/t/010_pingecho.t
index 90a934a0b1..e8a6bb093e 100644
--- a/dist/Net-Ping/t/010_pingecho.t
+++ b/dist/Net-Ping/t/010_pingecho.t
@@ -1,11 +1,16 @@
use warnings;
use strict;
+use Config;
BEGIN {
unless (my $port = getservbyname('echo', 'tcp')) {
print "1..0 \# Skip: no echo port\n";
exit;
}
+ unless ($Config{d_getpbyname}) {
+ print "1..0 \# Skip: no getprotobyname\n";
+ exit;
+ }
}
use Test::More tests => 2;