Koha/t/00-load.t
Galen Charlton e3322f732e bug 5386: remove dep on Path::Class from t/00-load.t
File::Spec is a core module, Path::Class isn't; not yet
worth adding a new dependency.

Also some minor whitepace cleanup.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 06:40:02 +13:00

24 lines
701 B
Perl

# This script is called by the pre-commit git hook to test modules compile
use strict;
use warnings;
use Test::More;
use File::Spec;
use File::Find;
my $lib = File::Spec->rel2abs('C4');
find({
bydepth => 1,
no_chdir => 1,
wanted => sub {
my $m = $_;
return unless $m =~ s/[.]pm$//;
return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use
return if $m =~ /Cache/; # Cache modules are a WIP, add the tests back when we are using them more
return if $m =~ /SIP/; # SIP modules will not load clean
$m =~ s{^.*/C4/}{C4/};
$m =~ s{/}{::}g;
use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
},
}, $lib);
done_testing();