Bugzilla – Attachment 99746 Details for
Bug 24756
Occasional failures for Koha/XSLT/Security.t
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24756: Fix D8 and U18 failures for Koha/XSLT/Security.t
Bug-24756-Fix-D8-and-U18-failures-for-KohaXSLTSecu.patch (text/plain), 1.70 KB, created by
Marcel de Rooy
on 2020-02-28 08:26:18 UTC
(
hide
)
Description:
Bug 24756: Fix D8 and U18 failures for Koha/XSLT/Security.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-02-28 08:26:18 UTC
Size:
1.70 KB
patch
obsolete
>From 8e4d0525ef72c01dd6d7b130af88acaa43c2b265 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 28 Feb 2020 08:20:43 +0000 >Subject: [PATCH] Bug 24756: Fix D8 and U18 failures for Koha/XSLT/Security.t >Content-Type: text/plain; charset=utf-8 > >Instead of warning_like, we eventually catch multiple warnings and look >if we catch one specific warn and not catch another specific one. > >Test plan: >Run t/db_dependent/Koha/XSLT/Security.t on D8, D9, D10 or U18. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Passes on D8 and D9 for me. >--- > t/db_dependent/Koha/XSLT/Security.t | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/t/db_dependent/Koha/XSLT/Security.t b/t/db_dependent/Koha/XSLT/Security.t >index 67a27ade3e..41b72aafb5 100644 >--- a/t/db_dependent/Koha/XSLT/Security.t >+++ b/t/db_dependent/Koha/XSLT/Security.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > use File::Temp qw/tempfile/; >-use Test::More tests => 7; >+use Test::More tests => 8; > use Test::Warn; > > use Koha::XSLT::Base; >@@ -120,9 +120,13 @@ $xslt=<<"EOT"; > EOT > $xslt_file = mytempfile($xslt); > $engine->print_warns(1); >-warning_like { $output= $engine->transform( "<ignored/>", $xslt_file ); } >- qr/I\/O warning : failed to load external entity/, >- 'Remote import does not fail on read_net'; >+{ >+ my @warn; >+ local $SIG{__WARN__} = sub { push @warn, $_[0]; }; >+ $output= $engine->transform( "<ignored/>", $xslt_file ); >+ is( ( grep { /failed to load external/ } @warn ), 1, 'Expected import error' ); >+ is( ( grep { /read_net/ } @warn ), 0, 'No read_net warn for remote import' ); >+} > > sub mytempfile { > my ( $fh, $fn ) = tempfile( SUFFIX => '.xsl', UNLINK => 1 ); >-- >2.11.0
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 24756
: 99746 |
99753
|
99754
|
99858
|
99892
|
102270
|
102271