summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJan Dubois <jand@activestate.com>2007-07-02 07:21:06 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-07-04 13:32:06 +0000
commita60c28c3eb1dec7e7ec009177c3f0b8ecfe7147d (patch)
treebb4d990129f09ab14f495b24eda91cdda3ba4410 /lib
parent04d1c4156e381ac787d2439f25f8152211f495f8 (diff)
downloadperl-a60c28c3eb1dec7e7ec009177c3f0b8ecfe7147d.tar.gz
RE: [PATCH] lib/Net/Ping/t/500_ping_icmp.t requires admin
From: "Jan Dubois" <jand@activestate.com> Message-ID: <007901c7bcee$e7b5d400$b7217c00$@com> p4raw-id: //depot/perl@31529
Diffstat (limited to 'lib')
-rw-r--r--lib/Net/Ping/t/500_ping_icmp.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Net/Ping/t/500_ping_icmp.t b/lib/Net/Ping/t/500_ping_icmp.t
index a4612b20c7..db20ac98ce 100644
--- a/lib/Net/Ping/t/500_ping_icmp.t
+++ b/lib/Net/Ping/t/500_ping_icmp.t
@@ -15,8 +15,8 @@ plan tests => 2;
# Everything loaded fine
ok 1;
-if (($> and $^O ne 'VMS' and $^O ne 'cygwin')
- or ($^O eq 'MSWin32'
+if (($> and $^O ne 'VMS')
+ or (($^O eq 'MSWin32' or $^O eq 'cygwin')
and !IsAdminUser())
or ($^O eq 'VMS'
and (`write sys\$output f\$privilege("SYSPRV")` =~ m/FALSE/))) {
@@ -29,7 +29,7 @@ if (($> and $^O ne 'VMS' and $^O ne 'cygwin')
}
sub IsAdminUser {
- return unless $^O eq 'MSWin32';
+ return unless $^O eq 'MSWin32' or $^O eq "cygwin";
return unless eval { require Win32 };
return unless defined &Win32::IsAdminUser;
return Win32::IsAdminUser();