This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
File::CheckTree.t: @INC should be change for chdir
[perl5.git]
/
lib
/
File
/
CheckTree.t
diff --git
a/lib/File/CheckTree.t
b/lib/File/CheckTree.t
index
656154a
..
1548a0f
100644
(file)
--- a/
lib/File/CheckTree.t
+++ b/
lib/File/CheckTree.t
@@
-2,23
+2,17
@@
BEGIN {
chdir 't' if -d 't';
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;
}
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
use File::CheckTree;
use File::Spec; # used to get absolute paths