Bugzilla – Attachment 38751 Details for
Bug 14110
Silence warnings t/00-load.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14110: Silence t/00-load.t warnings
Bug-14110-Silence-t00-loadt-warnings.patch (text/plain), 2.08 KB, created by
Mark Tompsett
on 2015-05-01 18:36:46 UTC
(
hide
)
Description:
Bug 14110: Silence t/00-load.t warnings
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-05-01 18:36:46 UTC
Size:
2.08 KB
patch
obsolete
>From d33f716562df3d19dac4bfe811713f6c1f684bae Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 1 May 2015 14:29:13 -0400 >Subject: [PATCH] Bug 14110: Silence t/00-load.t warnings > >prove t/00-load.t has noisy messages. This catches them. > >TEST PLAN >--------- >1) $ prove -v t/00-load.t > -- ugly INIT errors, etc. >2) apply patch >3) $ prove -v t/00-load.t > -- nice "Expected warnings" type messages on > the ones that were noisy. >4) koha qa test tools >--- > t/00-load.t | 28 +++++++++++++++++++++++++--- > 1 file changed, 25 insertions(+), 3 deletions(-) > >diff --git a/t/00-load.t b/t/00-load.t >index 21b62eb..d909567 100644 >--- a/t/00-load.t >+++ b/t/00-load.t >@@ -17,7 +17,9 @@ > > use Modern::Perl; > >+$| = 1; > use Test::More; >+use Test::Warn; > use File::Spec; > use File::Find; > >@@ -42,9 +44,29 @@ find({ > > $m =~ s{^.*/C4/}{C4/}; > $m =~ s{/}{::}g; >- return if $m =~ /Auth_with_ldap/; # Dont test this, it will fail on use >- return if $m =~ /SIPServer/; # SIP Server module has old package usage >- use_ok($m) || BAIL_OUT("***** PROBLEMS LOADING FILE '$m'"); >+ if ($m eq "C4::External::BakerTaylor") { >+ warning_like { eval "use $m; 1;" } >+qr/Too late to run INIT block at .*C4\/External\/BakerTaylor.pm line 42/i, >+ "use $m; -- Expected warnings"; >+ } >+ elsif ($m eq "C4::SIP::SIPServer") { >+ warning_like { eval "use $m; 1;" } >+qr/UNIVERSAL->import is deprecated and will be removed in a future perl/i, >+ "use $m; -- Expected warnings"; >+ } >+ elsif ($m eq "C4::Barcodes") { >+ warning_like { eval "use $m; 1;" } >+qr/Too late to run INIT block at .*C4\/Barcodes\/hbyymmincr.pm line 41/i, >+ "use $m; -- Expected warnings"; >+ } >+ elsif ($m eq "C4::Tags") { >+ warning_like { eval "use $m; 1;" } >+qr/Too late to run INIT block at .*C4\/Tags.pm line 75/i, >+ "use $m; -- Expected warnings"; >+ } >+ else { >+ warning_is { eval "use $m; 1;" } '',"use $m;"; >+ } > }, > }, $lib); > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14110
:
38751
|
39226