X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=t%2Ftestload.pm;fp=t%2Ftestload.pm;h=51c5fffbc6f8695fc23d2eb6900776a5476ccd93;hb=eb13c41145995bc9fad3ac583bc8dd43d472f64b;hp=fc4f23048a8c6b333ad591faf7487690760fff90;hpb=c230f8572235ab24af38b844219259ed17fc7b93;p=deb_pkgs%2Flibhtml-calendarmonth-perl.git diff --git a/t/testload.pm b/t/testload.pm index fc4f230..51c5fff 100644 --- a/t/testload.pm +++ b/t/testload.pm @@ -19,8 +19,10 @@ use vars qw( $Head_File $Odd_File $Woy_File - $I8N_File $Narrow_File + $I8N_File + $I8N_Legacy1_File + $I8N_Legacy2_File ); @EXPORT = qw( @@ -53,12 +55,14 @@ BEGIN { $Dat_Dir = File::Spec->catpath($vol, $dir, ''); } -$Bulk_File = File::Spec->catdir($Dat_Dir, 'bulk.dat'); -$Head_File = File::Spec->catdir($Dat_Dir, 'head.dat'); -$Odd_File = File::Spec->catdir($Dat_Dir, 'odd.dat'); -$Woy_File = File::Spec->catdir($Dat_Dir, 'woy.dat'); -$I8N_File = File::Spec->catdir($Dat_Dir, 'i8n.dat'); -$Narrow_File = File::Spec->catdir($Dat_Dir, 'narrow.dat'); +$Bulk_File = File::Spec->catdir($Dat_Dir, 'bulk.dat'); +$Head_File = File::Spec->catdir($Dat_Dir, 'head.dat'); +$Odd_File = File::Spec->catdir($Dat_Dir, 'odd.dat'); +$Woy_File = File::Spec->catdir($Dat_Dir, 'woy.dat'); +$Narrow_File = File::Spec->catdir($Dat_Dir, 'narrow.dat'); +$I8N_File = File::Spec->catdir($Dat_Dir, 'i8n.dat'); +$I8N_Legacy1_File = File::Spec->catdir($Dat_Dir, 'i8n_leg1.dat'); +$I8N_Legacy2_File = File::Spec->catdir($Dat_Dir, 'i8n_leg2.dat'); my(@Bulk, @Head, @Odd, @Woy, @I8N, @Nar); @@ -82,8 +86,17 @@ _load_file($Bulk_File, \@Bulk ); _load_file($Head_File, \@Head ); _load_file($Odd_File, \@Odd ); _load_file($Woy_File, \@Woy ); -_load_file($I8N_File, \@I8N ); -_load_file($Narrow_File, \@Nar); +_load_file($Narrow_File, \@Nar); + +if (HTML::CalendarMonth::Locale->_locale_version >= 1.03) { + _load_file($I8N_File, \@I8N ); +} +elsif (HTML::CalendarMonth::Locale->_locale_version >= 0.93) { + _load_file($I8N_Legacy2_File, \@I8N ); +} +else { + _load_file($I8N_Legacy1_File, \@I8N ); +} sub bulk_count { scalar @Bulk } sub head_count { scalar @Head }