From 779bcfb243f967b9345bfa627d57bf5dec869d30 Mon Sep 17 00:00:00 2001 From: Mason James Date: Fri, 27 Jan 2017 17:07:44 +1300 Subject: [PATCH] Revert "Bug 17917: [AMENDED] Fix path issue in t/db_dependent/check_sysprefs.t" This reverts commit 34b296cc3b9e06d2a235239b2bff79f06c12c26f. --- t/db_dependent/check_sysprefs.t | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/check_sysprefs.t b/t/db_dependent/check_sysprefs.t index b179c4a027..a53c575475 100755 --- a/t/db_dependent/check_sysprefs.t +++ b/t/db_dependent/check_sysprefs.t @@ -17,9 +17,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -use Modern::Perl; +use strict; +use warnings; -use Carp; use Getopt::Long; use C4::Context; @@ -33,13 +33,12 @@ our $dbh = C4::Context->dbh; my $root_dir = C4::Context->config('intranetdir') . '/installer/data/mysql'; my $base_syspref_file = "sysprefs.sql"; -open my $ref_fh, '<', "$root_dir/$base_syspref_file" or croak "Can't open '$root_dir/$base_syspref_file': $!"; +open( my $ref_fh, "<$root_dir/$base_syspref_file" ); my $ref_syspref = get_syspref_from_file($ref_fh); my @ref_sysprefs = sort { lc $a cmp lc $b } keys %$ref_syspref; -my $num_sysprefs = scalar @ref_sysprefs; if ( !$showsql ) { - cmp_ok( $num_sysprefs, '>', 0, - "Found $num_sysprefs sysprefs" ); + cmp_ok( $#ref_sysprefs, '>=', 0, + "Found " . ( $#ref_sysprefs + 1 ) . " sysprefs" ); } check_db($ref_syspref); -- 2.39.5