From: David Mitchell Date: Sat, 22 Aug 2009 17:16:24 +0000 (+0100) Subject: re-apply boilerplate to CGI test files X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0e44158ce94d11dde580b3793579946c7d918b97;p=p5sagit%2Fp5-mst-13.2.git re-apply boilerplate to CGI test files --- diff --git a/lib/CGI/t/upload.t b/lib/CGI/t/upload.t index 0989f1d..58f0971 100644 --- a/lib/CGI/t/upload.t +++ b/lib/CGI/t/upload.t @@ -7,7 +7,17 @@ # Due to a bug in older versions of MakeMaker & Test::Harness, we must # ensure the blib's are in @INC, else we might use the core CGI.pm -use lib qw(. ./blib/lib ./blib/arch); + +my $test_file; +if($ENV{PERL_CORE}) { + chdir 't'; + @INC = '../lib'; + use File::Spec (); + $test_file = File::Spec->catfile(qw(.. lib CGI t), "upload_post_text.txt"); +} else { + use lib qw(. ./blib/lib ./blib/arch); + $test_file = "t/upload_post_text.txt"; +} use strict; @@ -67,7 +77,7 @@ my $q; { local *STDIN; - open STDIN, 'new; diff --git a/lib/CGI/t/uploadInfo.t b/lib/CGI/t/uploadInfo.t index 970429b..591afa6 100644 --- a/lib/CGI/t/uploadInfo.t +++ b/lib/CGI/t/uploadInfo.t @@ -7,7 +7,17 @@ # Due to a bug in older versions of MakeMaker & Test::Harness, we must # ensure the blib's are in @INC, else we might use the core CGI.pm -use lib qw(. ./blib/lib ./blib/arch); + +my $test_file; +if($ENV{PERL_CORE}) { + chdir 't'; + @INC = '../lib'; + use File::Spec (); + $test_file = File::Spec->catfile(qw(.. lib CGI t), "upload_post_text.txt"); +} else { + use lib qw(. ./blib/lib ./blib/arch); + $test_file = "t/upload_post_text.txt"; +} use strict; @@ -68,7 +78,7 @@ my $q; { local *STDIN; - open STDIN, 'new;