This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move CGI.pm from lib to ext
[perl5.git] / ext / CGI / t / upload.t
similarity index 94%
rename from lib/CGI/t/upload.t
rename to ext/CGI/t/upload.t
index 58f0971..0989f1d 100644 (file)
@@ -7,17 +7,7 @@
 
 # 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
-
-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 lib qw(. ./blib/lib ./blib/arch);
 
 use strict;
 
@@ -77,7 +67,7 @@ my $q;
 
 {
     local *STDIN;
-    open STDIN, "< $test_file"
+    open STDIN, '<t/upload_post_text.txt'
         or die 'missing test file t/upload_post_text.txt';
     binmode STDIN;
     $q = CGI->new;