]> git.donarmstrong.com Git - deb_pkgs/libhtml-calendarmonth-perl.git/blobdiff - t/testload.pm
Merge tag 'upstream/2.04'
[deb_pkgs/libhtml-calendarmonth-perl.git] / t / testload.pm
index fc4f23048a8c6b333ad591faf7487690760fff90..51c5fffbc6f8695fc23d2eb6900776a5476ccd93 100644 (file)
@@ -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 }