X-Git-Url: https://git.donarmstrong.com/?p=deb_pkgs%2Flibhtml-calendarmonth-perl.git;a=blobdiff_plain;f=t%2Ftestload.pm;h=cfb25461c66926d8924f4d24788b031ab27fc30e;hp=d822ee7742b564ace66c3d17cf7e2b5c853c89bb;hb=ce0063ff352f9e5b6659fccdc4eee5e49f815cef;hpb=45a931bb47650c2045bc934f89ef4eea8840c823 diff --git a/t/testload.pm b/t/testload.pm index d822ee7..cfb2546 100644 --- a/t/testload.pm +++ b/t/testload.pm @@ -19,21 +19,23 @@ use File::Spec; use HTML::CalendarMonth; use HTML::CalendarMonth::DateTool; -my $base_dir; +my($base_dir, $vol, $dir); BEGIN { my $pkg = __PACKAGE__; $pkg =~ s%::%/%g; $pkg .= '.pm'; $pkg = File::Spec->canonpath($INC{$pkg}); - $pkg =~ s/\/[^\/]+\.pm$//; - $base_dir = $pkg; + my $file; + ($vol, $dir, $file) = File::Spec->splitpath($pkg); + $base_dir = File::Spec->catpath($vol, $dir); } $Dat_Dir = $base_dir; my($tcount, $rds, %dates, @tmethods, @twy_methods, @Cals); # Required test dates -open(D, "$Dat_Dir/test.dat") or die "Problem reading $Dat_Dir/test.dat: $!\n"; +my $dat_file = File::Spec->catpath($vol, $dir, 'test.dat'); +open(D, "<$dat_file") or die "Problem reading $dat_file: $!\n"; $rds = ; foreach (split(' ', $rds)) { ++$dates{$_};