summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2010-10-27 22:54:59 -0600
committerFather Chrysostomos <sprout@cpan.org>2010-10-28 09:35:27 -0700
commit691135482762ce9dc9654f3848979dfe881cceb5 (patch)
treec18a667bc820b666ab64fe429ee60c730c04ecb9 /lib/File
parente6070cd609a1c2bf6abe7cb73ab39e0af43355f1 (diff)
downloadperl-691135482762ce9dc9654f3848979dfe881cceb5.tar.gz
File::CheckTree.t: @INC should be change for chdir
This test has a workaround for windows that isn't needed if it just sets up the @INC initially to allow for finding things both before and after the chdir. And, it's unreasonable to expect that nothing it calls would in turn never do their own module load, so the @INC needs to be correct anyway.
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/CheckTree.t16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/File/CheckTree.t b/lib/File/CheckTree.t
index 656154a870..1548a0ff8b 100644
--- a/lib/File/CheckTree.t
+++ b/lib/File/CheckTree.t
@@ -2,23 +2,17 @@
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
+
+ # We will shortly chdir .., so '../lib' will be wrong at that time, and
+ # 'lib' will be correct
+ @INC = ('../lib', 'lib');
}
use Test::More tests => 23;
use strict;
-BEGIN {
-# Cwd::cwd does an implicit "require Win32", but
-# the ../lib directory in @INC will no longer work once
-# we chdir() out of the "t" directory.
- if ($^O eq 'MSWin32') {
- require Win32;
- Win32->import();
- }
- require overload;
-}
+require overload;
use File::CheckTree;
use File::Spec; # used to get absolute paths