Subject: | HTML-CalendarMonth tests die on win32 - patches |
The tests die on Windows, with error messages such as:
Show quoted text
>prove -b t\01_autodetect.t
t\01_autodetect....Problem reading
C:\WINDOWS\Temp\cpan\build\HTML-CalendarMonth-1.17\t\testload.pm/test.dat:
No such file or directory
Compilation failed in require at t\01_autodetect.t line 7.
BEGIN failed--compilation aborted at t\01_autodetect.t line 7.
t\01_autodetect....dubious
Test returned status 2 (wstat 512, 0x200)
FAILED--1 test script could be run, alas--no output ever seen
Applying the following 2 patches cause all tests to pass.
patch for file: Makefile.PL
48a49,50
Show quoted text> FindBin => 0,
> File::Spec => 0,
patch for file: t\testload.pm
6a7,8
Show quoted text> use FindBin;
> use File::Spec;
22,32d23
< my $base_dir;
< BEGIN {
< my $pkg = __PACKAGE__;
< $pkg =~ s%::%/%g;
< $pkg .= '.pm';
< $pkg = File::Spec->canonpath($INC{$pkg});
< $pkg =~ s/\/[^\/]+\.pm$//;
< $base_dir = $pkg;
< }
< $Dat_Dir = $base_dir;
<
34a26,27
Show quoted text> my $dat_file = File::Spec->catfile( $FindBin::RealBin, 'test.dat' );
>
36c29
< open(D, "$Dat_Dir/test.dat") or die "Problem reading
$Dat_Dir/test.dat: $!\n";
---
Show quoted text> open(D, $dat_file) or die "Problem reading $dat_file: $!\n";
This is perl 5.8.8, GNU gcc (mingw) 3.4.5, WinXP SP2