From: Graham Barr Date: Fri, 26 Oct 2001 13:22:38 +0000 (+0000) Subject: Fix tests to be able to run in the core and the CPAN dist X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=302cc833bfd3756cf192f5a7cc5b1dd6f218515a;p=p5sagit%2Fp5-mst-13.2.git Fix tests to be able to run in the core and the CPAN dist p4raw-id: //depot/perl@12681 --- diff --git a/lib/Net/t/ftp.t b/lib/Net/t/ftp.t index 46304db..f0d0c11 100644 --- a/lib/Net/t/ftp.t +++ b/lib/Net/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/lib/Net/t/hostname.t b/lib/Net/t/hostname.t index 3e55ace..3bbe2cf 100644 --- a/lib/Net/t/hostname.t +++ b/lib/Net/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/lib/Net/t/nntp.t b/lib/Net/t/nntp.t index 1afb588..6b905e3 100644 --- a/lib/Net/t/nntp.t +++ b/lib/Net/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/lib/Net/t/require.t b/lib/Net/t/require.t index 39d8f7e..82b0472 100644 --- a/lib/Net/t/require.t +++ b/lib/Net/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/lib/Net/t/smtp.t b/lib/Net/t/smtp.t index 55607fe..a137a36 100644 --- a/lib/Net/t/smtp.t +++ b/lib/Net/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;