Merge remote branch 'kc/new/bug_5386' into kcmaster
[koha.git] / t / 00-load.t
1 # This script is called by the pre-commit git hook to test modules compile
2
3 use strict;
4 use warnings;
5 use Test::More;
6 use File::Spec;
7 use File::Find;
8
9 my $lib = File::Spec->rel2abs('C4');
10 find({
11     bydepth => 1,
12     no_chdir => 1,
13     wanted => sub {
14         my $m = $_;
15             return unless $m =~ s/[.]pm$//;
16             return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use
17             return if $m =~ /Cache/; # Cache modules are a WIP, add the tests back when we are using them more
18             return if $m =~ /SIP/; # SIP modules will not load clean
19             $m =~ s{^.*/C4/}{C4/};      
20             $m =~ s{/}{::}g;
21             use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
22     },
23 }, $lib);
24 done_testing();