Subject: | Failning win32 tests - easy fix |
Hi!
The tests fail on ActiveState win32 at the moment:
C:\.cpan\build\Test-MockObject-0.14\t>perl extends.t
1..13
ok 1 - use Test::MockObject::Extends;
ok 2 - The object isa Test::MockObject
ok 3 - passing a class name to new() should set inheritance properly
not ok 4 - new() should load parent module unless already loaded
# Failed test (extends.t at line 23)
Can't locate Some/Class.pm in @INC (@INC contains: ../lib ../blib/lib C:/appl/de
v/mod_perl/Perl/lib C:/appl/dev/mod_perl/Perl/site/lib .) at ../lib/Test/MockObj
ect/Extends.pm line 19.
# Looks like you planned 13 tests but only ran 4.
# Looks like your test died just after 4.
It's this test (line 22):
$tme = $module->new( 'File::Spec' );
ok( $INC{ File::Spec->catfile( qw( File Spec.pm ) ) },
'new() should load parent module unless already loaded' );
The catfile() call gives 'File\Spec.pm', but %INC actually contains the key 'File/Spec.pm'.
It seems anything that fiddles with %INC in win32 and uses File::Spec is "too correct"... Doing
use Data::Dumper; print Dumper(\%INC);
gives me:
$VAR1 = {
'XSLoader.pm' => 'C:/appl/dev/mod_perl/Perl/lib/XSLoader.pm',
'warnings/register.pm' => 'C:/appl/dev/mod_perl/Perl/lib/warnings/regi
ster.pm',
'List/Util.pm' => 'C:/appl/dev/mod_perl/Perl/lib/List/Util.pm',
'warnings.pm' => 'C:/appl/dev/mod_perl/Perl/lib/warnings.pm',
'threads.pm' => 'C:/appl/dev/mod_perl/Perl/lib/threads.pm',
'Config.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Config.pm',
'threads/shared.pm' => 'C:/appl/dev/mod_perl/Perl/lib/threads/shared.p
m',
'Test/MockObject.pm' => '../lib/Test/MockObject.pm',
'Test/More.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Test/More.pm',
'bytes.pm' => 'C:/appl/dev/mod_perl/Perl/lib/bytes.pm',
'Carp.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Carp.pm',
'File/Spec/Unix.pm' => 'C:/appl/dev/mod_perl/Perl/lib/File/Spec/Unix.p
m',
'Scalar/Util.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Scalar/Util.pm',
'Exporter/Heavy.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Exporter/Heavy.p
m',
'strict.pm' => 'C:/appl/dev/mod_perl/Perl/lib/strict.pm',
'vars.pm' => 'C:/appl/dev/mod_perl/Perl/lib/vars.pm',
'Exporter.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Exporter.pm',
'Test/Builder.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Test/Builder.pm',
'File/Spec.pm' => 'C:/appl/dev/mod_perl/Perl/lib/File/Spec.pm',
'Test/MockObject/Extends.pm' => '../lib/Test/MockObject/Extends.pm',
'overload.pm' => 'C:/appl/dev/mod_perl/Perl/lib/overload.pm',
'AutoLoader.pm' => 'C:/appl/dev/mod_perl/Perl/lib/AutoLoader.pm',
'lib.pm' => 'C:/appl/dev/mod_perl/Perl/lib/lib.pm',
'File/Spec/Win32.pm' => 'C:/appl/dev/mod_perl/Perl/lib/File/Spec/Win32
.pm',
'DynaLoader.pm' => 'C:/appl/dev/mod_perl/Perl/lib/DynaLoader.pm',
'Data/Dumper.pm' => 'C:/appl/dev/mod_perl/Perl/lib/Data/Dumper.pm'
};
Hope that helps,
/J
perl -v
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 809 based on sources provided by
ActiveState Corp. http://www.ActiveState.com
ActiveState is a division of Sophos.
Built Feb 14 2004 17:12:36
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.