about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2001-10-26 15:23:52 +0000
committerGraham Barr <gbarr@pobox.com>2001-10-26 15:23:52 +0000
commitf473f405ee0d6abe93386f9f4f855981dfe73955 (patch)
tree6255eb68bf645f678aceef3c7ab3b2b43e86ce5b
parent4e1bbf4b28512c6de59225e1b63e05dcbefd78e0 (diff)
downloadperl-libnet-f473f405ee0d6abe93386f9f4f855981dfe73955.tar.gz
Make tests compatable with the perl core distribution
-rw-r--r--t/ftp.t7
-rw-r--r--t/hostname.t8
-rw-r--r--t/nntp.t7
-rw-r--r--t/require.t8
-rw-r--r--t/smtp.t7
5 files changed, 37 insertions, 0 deletions
diff --git a/t/ftp.t b/t/ftp.t
index 46304db..f0d0c11 100644
--- a/t/ftp.t
+++ b/t/ftp.t
@@ -1,5 +1,12 @@
 #!./perl -w
 
+BEGIN {
+    unless (-d 'blib') {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
+
 use Net::Config;
 use Net::FTP;
 
diff --git a/t/hostname.t b/t/hostname.t
index 3e55ace..3bbe2cf 100644
--- a/t/hostname.t
+++ b/t/hostname.t
@@ -1,3 +1,11 @@
+#!./perl -w
+
+BEGIN {
+    unless (-d 'blib') {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
 
 use Net::Domain qw(hostname domainname hostdomain);
 use Net::Config;
diff --git a/t/nntp.t b/t/nntp.t
index 1afb588..6b905e3 100644
--- a/t/nntp.t
+++ b/t/nntp.t
@@ -1,5 +1,12 @@
 #!./perl -w
 
+BEGIN {
+    unless (-d 'blib') {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
+
 use Net::Config;
 use Net::NNTP;
 use Net::Cmd qw(CMD_REJECT);
diff --git a/t/require.t b/t/require.t
index 39d8f7e..82b0472 100644
--- a/t/require.t
+++ b/t/require.t
@@ -1,3 +1,11 @@
+#!./perl -w
+
+BEGIN {
+    unless (-d 'blib') {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
 
 print "1..9\n";
 my $i = 1;
diff --git a/t/smtp.t b/t/smtp.t
index 55607fe..a137a36 100644
--- a/t/smtp.t
+++ b/t/smtp.t
@@ -1,5 +1,12 @@
 #!./perl -w
 
+BEGIN {
+    unless (-d 'blib') {
+        chdir 't' if -d 't';
+        @INC = '../lib';
+    }
+}
+
 use Net::Config;
 use Net::SMTP;