about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-11-27 13:20:48 +0000
committerGraham Barr <gbarr@pobox.com>2001-11-27 13:20:48 +0000
commit44ae04c76c92f9bcee7b47b4455c80613e409774 (patch)
tree0caf31dc573e25fc8dc6979245b182a908c63cbe
parent4c5b37af028b98b0f160ea85f38210fe3629c679 (diff)
downloadperl-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

-rw-r--r--t/config.t3
-rw-r--r--t/ftp.t3
-rw-r--r--t/hostname.t3
-rw-r--r--t/netrc.t7
-rw-r--r--t/nntp.t3
-rw-r--r--t/require.t3
-rw-r--r--t/smtp.t3
7 files changed, 23 insertions, 2 deletions
diff --git a/t/config.t b/t/config.t
index 4643971..560addb 100644
--- a/t/config.t
+++ b/t/config.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;
+    }
     $INC{'Socket.pm'} = 1;
 }
 
diff --git a/t/ftp.t b/t/ftp.t
index f0d0c11..be62458 100644
--- a/t/ftp.t
+++ b/t/ftp.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::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);
diff --git a/t/netrc.t b/t/netrc.t
index a4dd778..4b67e85 100644
--- a/t/netrc.t
+++ b/t/netrc.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 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);
 }
 
diff --git a/t/nntp.t b/t/nntp.t
index 6b905e3..ffeb123 100644
--- a/t/nntp.t
+++ b/t/nntp.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::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";
diff --git a/t/smtp.t b/t/smtp.t
index a137a36..eb52f7c 100644
--- a/t/smtp.t
+++ b/t/smtp.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::Config;