diff options
author | Graham Barr <gbarr@pobox.com> | 2001-11-27 13:20:48 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2001-11-27 13:20:48 +0000 |
commit | 44ae04c76c92f9bcee7b47b4455c80613e409774 (patch) | |
tree | 0caf31dc573e25fc8dc6979245b182a908c63cbe /t | |
parent | 4c5b37af028b98b0f160ea85f38210fe3629c679 (diff) | |
download | perl-libnet-44ae04c76c92f9bcee7b47b4455c80613e409774.tar.gz |
Skip tests if we are on an EBCDIC machine, but Convert::EBCDIC is not installed
Make tests run with 5.004
Diffstat (limited to 't')
-rw-r--r-- | t/config.t | 3 | ||||
-rw-r--r-- | t/ftp.t | 3 | ||||
-rw-r--r-- | t/hostname.t | 3 | ||||
-rw-r--r-- | t/netrc.t | 7 | ||||
-rw-r--r-- | t/nntp.t | 3 | ||||
-rw-r--r-- | t/require.t | 3 | ||||
-rw-r--r-- | t/smtp.t | 3 |
7 files changed, 23 insertions, 2 deletions
@@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } $INC{'Socket.pm'} = 1; } @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } use Net::Config; diff --git a/t/hostname.t b/t/hostname.t index 8c37472..2569722 100644 --- a/t/hostname.t +++ b/t/hostname.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } use Net::Domain qw(hostname domainname hostdomain); @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } use strict; @@ -41,7 +44,7 @@ ok( exists $INC{'Net/Netrc.pm'}, 'should be able to use Net::Netrc' ); SKIP: { skip('incompatible stat() handling for OS', 4), next SKIP - if ($^O =~ /os2|win32|macos|cygwin/i); + if ($^O =~ /os2|win32|macos|cygwin/i or $] < 5.005); my $warn; local $SIG{__WARN__} = sub { @@ -125,7 +128,7 @@ sub new { } sub TIEHANDLE { - my ($class, undef, $file, $mode) = @_; + my ($class, $file, $mode) = @_[0,2,3]; bless({ file => $file, mode => $mode }, $class); } @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } use Net::Config; diff --git a/t/require.t b/t/require.t index 82b0472..95dea87 100644 --- a/t/require.t +++ b/t/require.t @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } print "1..9\n"; @@ -5,6 +5,9 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; } + if (ord('A') == 193 && !eval "require Convert::EBCDIC") { + print "1..0 # EBCDIC but no Convert::EBCDIC\n"; exit 0; + } } use Net::Config; |