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

(-)a/t/00-load.t (-4 / +25 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
$| = 1;
20
use Test::More;
21
use Test::More;
22
use Test::Warn;
21
use File::Spec;
23
use File::Spec;
22
use File::Find;
24
use File::Find;
23
25
Lines 42-50 find({ Link Here
42
44
43
        $m =~ s{^.*/C4/}{C4/};
45
        $m =~ s{^.*/C4/}{C4/};
44
        $m =~ s{/}{::}g;
46
        $m =~ s{/}{::}g;
45
        return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use
47
        if ($m eq "C4::External::BakerTaylor") {
46
        return if $m =~ /SIPServer/; # SIP Server module has old package usage
48
            warning_like { eval "use $m; 1;" }
47
        use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'");
49
qr/Too late to run INIT block at .*C4\/External\/BakerTaylor.pm line 42/i,
50
                "use $m; -- Expected warnings";
51
        }
52
        elsif ($m eq "C4::SIP::SIPServer") {
53
            warning_like { eval "use $m; 1;" }
54
qr/UNIVERSAL->import is deprecated and will be removed in a future perl/i,
55
                "use $m; -- Expected warnings";
56
        }
57
        elsif ($m eq "C4::Barcodes") {
58
            warning_like { eval "use $m; 1;" }
59
qr/Too late to run INIT block at .*C4\/Barcodes\/hbyymmincr.pm line 41/i,
60
                "use $m; -- Expected warnings";
61
        }
62
        elsif ($m eq "C4::Tags") {
63
            warning_like { eval "use $m; 1;" }
64
qr/Too late to run INIT block at .*C4\/Tags.pm line 75/i,
65
                "use $m; -- Expected warnings";
66
        }
67
        else {
68
            warning_is { eval "use $m; 1;" } '',"use $m;";
69
        }
48
    },
70
    },
49
}, $lib);
71
}, $lib);
50
72
51
- 

Return to bug 14110