fixes to xt/sysprefs.t test case
authorGalen Charlton <gmcharlt@gmail.com>
Sat, 19 Jun 2010 19:56:07 +0000 (15:56 -0400)
committerGalen Charlton <gmcharlt@gmail.com>
Sat, 19 Jun 2010 19:56:07 +0000 (15:56 -0400)
* use root of source tree as base directory
* ignore case when comparing system preference codes;
  at present this is also case-insenstive in the database
* added German sysprefs file
* corrected paths to Russian and Ukrainian system preference files

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>

xt/syspref.t

index ab07e37..3d10218 100755 (executable)
@@ -24,12 +24,13 @@ use Test::More qw(no_plan);
 
 use C4::Context;
 
-my $root_dir = C4::Context->config( 'intranetdir' ) . '/installer/data/mysql';
+my $root_dir = 'installer/data/mysql';
 my $base_syspref_file = "en/mandatory/sysprefs.sql";
 my @trans_syspref_files = qw(
+    de-DE/mandatory/sysprefs.sql
     fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
-    uk-UA/mandatory/system_preferences_optimal.sql
-    ru-RU/mandatory/system_preferences_optimal.sql
+    uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
+    ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
     pl-PL/mandatory/sysprefs.sql
 );
 
@@ -64,6 +65,8 @@ sub get_syspref_from_file {
         /\(\'([\w\-:]+)\'/;
         my $variable = $1;
         next unless $variable;
+        # lowercase syspref - at present, systempreference lookup is not case-sensitive
+        $variable = lc $variable;
         $syspref{$variable} = 1;
     }
     return \%syspref;