View | Details | Raw Unified | Return to bug 17917
Collapse All | Expand All

(-)a/t/db_dependent/check_sysprefs.t (-6 / +6 lines)
Lines 17-25 Link Here
17
# with this program; if not, write to the Free Software Foundation, Inc.,
17
# with this program; if not, write to the Free Software Foundation, Inc.,
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
19
20
use strict;
20
use Modern::Perl;
21
use warnings;
22
21
22
use Carp;
23
use Getopt::Long;
23
use Getopt::Long;
24
use C4::Context;
24
use C4::Context;
25
25
Lines 33-44 our $dbh = C4::Context->dbh; Link Here
33
my $root_dir = C4::Context->config('intranetdir') . '/installer/data/mysql';
33
my $root_dir = C4::Context->config('intranetdir') . '/installer/data/mysql';
34
my $base_syspref_file = "sysprefs.sql";
34
my $base_syspref_file = "sysprefs.sql";
35
35
36
open( my $ref_fh, "<$root_dir/$base_syspref_file" );
36
open my $ref_fh, '<', "$root_dir/$base_syspref_file" or croak "Can't open '$root_dir/$base_syspref_file': $!";
37
my $ref_syspref = get_syspref_from_file($ref_fh);
37
my $ref_syspref = get_syspref_from_file($ref_fh);
38
my @ref_sysprefs = sort { lc $a cmp lc $b } keys %$ref_syspref;
38
my @ref_sysprefs = sort { lc $a cmp lc $b } keys %$ref_syspref;
39
my $num_sysprefs = scalar @ref_sysprefs;
39
if ( !$showsql ) {
40
if ( !$showsql ) {
40
    cmp_ok( $#ref_sysprefs, '>=', 0,
41
    cmp_ok( $num_sysprefs, '>', 0,
41
        "Found " . ( $#ref_sysprefs + 1 ) . " sysprefs" );
42
        "Found $num_sysprefs sysprefs" );
42
}
43
}
43
44
44
check_db($ref_syspref);
45
check_db($ref_syspref);
45
- 

Return to bug 17917