Subject: | fix icmp test: cygwin requires admin also |
Attached patch by Jan Dubois (to blead, please use -p2) fixes a test
issue for cygwin users which are not admin.
http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2007-07/msg00143.html
--
Reini Urban
Subject: | pl-ping-t-500.patch |
diff -ub perl-current/lib/Net/Ping/t/500_ping_icmp.t.orig perl-current/lib/Net/Ping/t/500_ping_icmp.t
--- perl-current/lib/Net/Ping/t/500_ping_icmp.t.orig 2006-06-13 19:29:17.000000000 +0000
+++ perl-current/lib/Net/Ping/t/500_ping_icmp.t 2007-07-02 22:03:01.461375000 +0000
@@ -15,8 +15,8 @@
# 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 @@
}
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();