about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-12-10 20:15:19 +0000
committerGraham Barr <gbarr@pobox.com>2001-12-10 20:15:19 +0000
commit908e7aa6f8f4732ad1dde09a038b15cc4626a463 (patch)
treef3c566188d25d713a69247efc575cbbafb9f63d1
parent44ae04c76c92f9bcee7b47b4455c80613e409774 (diff)
downloadperl-libnet-908e7aa6f8f4732ad1dde09a038b15cc4626a463.tar.gz
More test updates from the core
-rw-r--r--t/config.t2
-rw-r--r--t/netrc.t13
2 files changed, 11 insertions, 4 deletions
diff --git a/t/config.t b/t/config.t
index 560addb..bd56ca5 100644
--- a/t/config.t
+++ b/t/config.t
@@ -5,6 +5,8 @@ BEGIN {
         chdir 't' if -d 't';
         @INC = '../lib';
     }
+    undef *{Socket::inet_aton};
+    undef *{Socket::inet_ntoa};
     if (ord('A') == 193 && !eval "require Convert::EBCDIC") {
         print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0;
     }
diff --git a/t/netrc.t b/t/netrc.t
index 4b67e85..d54b3c6 100644
--- a/t/netrc.t
+++ b/t/netrc.t
@@ -55,13 +55,18 @@ SKIP: {
         $stat[2] = 077;
         ok( !defined(Net::Netrc::_readrc()),
                 '_readrc() should not read world-writable file' );
-        ok( $warn =~ /^Bad permissions/, '... and should warn about it' );
+        ok( $warn =~ /^Bad permissions:/, '... and should warn about it' );
 
         # the owner field should still not match
         $stat[2] = 0;
-        ok( !defined(Net::Netrc::_readrc()),
-                '_readrc() should not read file owned by someone else' );
-        ok( $warn =~ /^Not owner/, '... and should warn about it' );
+
+        if ($<) {
+          ok( !defined(Net::Netrc::_readrc()),
+              '_readrc() should not read file owned by someone else' );
+          ok( $warn =~ /^Not owner:/, '... and should warn about it' );
+        } else {
+          skip("testing as root",2);
+        }
 }
 
 # this field must now match, to avoid the last-tested warning