diff options
author | Graham Barr <gbarr@pobox.com> | 2001-12-10 20:15:19 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2001-12-10 20:15:19 +0000 |
commit | 908e7aa6f8f4732ad1dde09a038b15cc4626a463 (patch) | |
tree | f3c566188d25d713a69247efc575cbbafb9f63d1 | |
parent | 44ae04c76c92f9bcee7b47b4455c80613e409774 (diff) | |
download | perl-libnet-908e7aa6f8f4732ad1dde09a038b15cc4626a463.tar.gz |
More test updates from the core
-rw-r--r-- | t/config.t | 2 | ||||
-rw-r--r-- | t/netrc.t | 13 |
2 files changed, 11 insertions, 4 deletions
@@ -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; } @@ -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 |