"Fossies" - the Fresh Open Source Software Archive

Member "perl-5.32.1/dist/Net-Ping/t/010_pingecho.t" (18 Dec 2020, 571 Bytes) of package /linux/misc/perl-5.32.1.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 use warnings;
    2 use strict;
    3 use Config;
    4 
    5 BEGIN {
    6   unless (my $port = getservbyname('echo', 'tcp')) {
    7     print "1..0 \# Skip: no echo port\n";
    8     exit;
    9   }
   10   unless ($Config{d_getpbyname}) {
   11     print "1..0 \# Skip: no getprotobyname\n";
   12     exit;
   13   }
   14 }
   15 
   16 use Test::More tests => 2;
   17 BEGIN {use_ok('Net::Ping')};
   18 
   19 TODO: {
   20     local $TODO = "Not working on os390 smoker; may be a permissions problem"
   21       if $^O eq 'os390';
   22     $TODO = "Not working on freebsd" if $^O eq 'freebsd';
   23     my $result = pingecho("127.0.0.1");
   24     is($result, 1, "pingecho 127.0.0.1 works");
   25 }