summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2006-11-08 15:18:23 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-08 15:33:02 +0000
commitab7423222bba21f69873406be80957820f00b893 (patch)
tree72ef0097d7fde7f1bdd136586b82f0ce529e0068
parentcec0e1a713ccb7c8fc9ec931b52653d1683bcbb9 (diff)
downloadperl-ab7423222bba21f69873406be80957820f00b893.tar.gz
fails under minitest
From: "Robin Barker" <Robin.Barker@npl.co.uk> Message-ID: <2C2E01334A940D4792B3E115F95B7226120AA5@exchsvr1.npl.ad.local> p4raw-id: //depot/perl@29236
-rw-r--r--t/op/inccode.t25
1 files changed, 15 insertions, 10 deletions
diff --git a/t/op/inccode.t b/t/op/inccode.t
index d9516fa763..a64716bfb9 100644
--- a/t/op/inccode.t
+++ b/t/op/inccode.t
@@ -3,11 +3,14 @@
# Tests for the coderef-in-@INC feature
my $can_fork = 0;
+my $minitest = $ENV{PERL_CORE_MINITEST};
+
BEGIN {
chdir 't' if -d 't';
@INC = qw(. ../lib);
}
-{
+
+if (!$minitest) {
use Config;
if (PerlIO::Layer->find('perlio') && $Config{d_fork} &&
eval 'require POSIX; 1') {
@@ -19,7 +22,7 @@ use strict;
use File::Spec;
require "test.pl";
-plan(tests => 48 + 14 * $can_fork);
+plan(tests => 45 + !$minitest * (3 + 14 * $can_fork));
my @tempfiles = ();
@@ -197,6 +200,16 @@ my $ret = "";
$ret ||= do 'abc.pl';
is( $ret, 'abc', 'do "abc.pl" sees return value' );
+{
+ my $filename = $^O eq 'MacOS' ? ':Foo:Foo.pm' : './Foo.pm';
+ local @INC;
+ @INC = sub { $filename = 'seen'; return undef; };
+ eval { require $filename; };
+ is( $filename, 'seen', 'the coderef sees fully-qualified pathnames' );
+}
+
+exit if $minitest;
+
pop @INC;
push @INC, sub {
@@ -220,14 +233,6 @@ is( our $file, '/custom/path/to/Publius/Vergilius/Maro.pm', '__FILE__ set correc
pop @INC;
-my $filename = $^O eq 'MacOS' ? ':Foo:Foo.pm' : './Foo.pm';
-{
- local @INC;
- @INC = sub { $filename = 'seen'; return undef; };
- eval { require $filename; };
- is( $filename, 'seen', 'the coderef sees fully-qualified pathnames' );
-}
-
if ($can_fork) {
require PerlIO::scalar;
# This little bundle of joy generates n more recursive use statements,