From 81422661717c839d1236628e881629f6c3918533 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 1 Jun 2020 12:54:03 +0200 Subject: [PATCH] Bug 25641: Fix Koha/XSLT/Base.t failures on U20 There is a change in the version number. On U20 we get Opening and ending tag mismatch: a line 0 and b On others (D9, D10, U18) we get: Opening and ending tag mismatch: a line 1 and b I did not find where it did come from, so assuming it's just a minor change and won't have side-effects. Test plan: Make sure the tests pass on U20 and another OS --- t/db_dependent/Koha/XSLT/Base.t | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/db_dependent/Koha/XSLT/Base.t b/t/db_dependent/Koha/XSLT/Base.t index 55f490c6e8..a13f109554 100644 --- a/t/db_dependent/Koha/XSLT/Base.t +++ b/t/db_dependent/Koha/XSLT/Base.t @@ -84,7 +84,7 @@ is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on non-xm # Malformed XML tests warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) } - qr{parser error : Opening and ending tag mismatch: a line 1 and b}, + qr{parser error : Opening and ending tag mismatch: a line (0|1) and b}, "Malformed XML warning correctly displayed"; is( $engine->err, Koha::XSLT::Base::XSLTH_ERR_5, 'Engine returns error on malformed xml' ); @@ -96,18 +96,18 @@ my $secondengine=Koha::XSLT::Base->new( { }); $engine->do_not_return_source(1); warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) } - qr{parser error : Opening and ending tag mismatch: a line 1 and b}, + qr{parser error : Opening and ending tag mismatch: a line (0|1) and b}, "Malformed XML warning correctly displayed"; is( defined $output? 1: 0, 0, 'Engine respects do_not_return_source==1'); $secondengine->print_warns(1); warning_like { $output = $secondengine->transform({ xml => '', code => $xsl_1 }) } - qr{parser error : Opening and ending tag mismatch: a line 1 and b}, + qr{parser error : Opening and ending tag mismatch: a line (0|1) and b}, "Malformed XML warning correctly displayed"; is( defined $output? 1: 0, 0, 'Second engine respects it too'); undef $secondengine; #bye $engine->do_not_return_source(0); warning_like { $output = $engine->transform({ xml => '', code => $xsl_1 }) } - qr{parser error : Opening and ending tag mismatch: a line 1 and b}, + qr{parser error : Opening and ending tag mismatch: a line (0|1) and b}, "Malformed XML warning correctly displayed"; is( defined $output? 1: 0, 1, 'Engine respects do_not_return_source==0'); -- 2.20.1