From: Rafael Garcia-Suarez Date: Tue, 29 Jan 2002 22:03:45 +0000 (+0100) Subject: new test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d820be449ce8e26e00bfc816fad88d234aba9cb9;p=p5sagit%2Fp5-mst-13.2.git new test Message-ID: <20020129220345.A704@rafael> p4raw-id: //depot/perl@14496 --- diff --git a/t/op/inccode.t b/t/op/inccode.t index 49ab85f..1a3d3cf 100644 --- a/t/op/inccode.t +++ b/t/op/inccode.t @@ -10,7 +10,7 @@ BEGIN { use File::Spec; require "test.pl"; -plan(tests => 43); +plan(tests => 44); my @tempfiles = (); @@ -172,3 +172,11 @@ ok( ! ref $INC{'Toto.pm'}, q/ val Toto.pm isn't a ref in %INC/ ); is( $INC{'Toto.pm'}, 'xyz', ' val Toto.pm is correct in %INC' ); 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' ); +}