Skip Menu |
 

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 88375
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: yoreek [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: t/35huge_mode.t fails with libxml2 < 2.7.0
Download (untitled) / with headers
text/plain 659b
Hi! I found that t/35huge_mode.t test fails with libxml2 < 2.7.0: # Failed test 'exception thrown during parse' # at t/35huge_mode.t line 49. # got: '' # expected: anything else # Failed test 'exception refers to entity reference loop' # at t/35huge_mode.t line 50. # '' # doesn't match '(?^si:entity.*loop)' # Looks like you failed 2 tests of 5. t/35huge_mode.t ........................ Dubious, test returned 2 (wstat 512, 0x200) Failed 2/5 subtests This happens because that XML_PARSE_HUGE option has been added to libxml2 from version 2.7.0. I propose the following patch to solve the problem. -- YOREEK
Subject: 35huge_mode.t.patch
Download 35huge_mode.t.patch
text/x-diff 585b
diff -Nura XML-LibXML-2.0104-orig/t/35huge_mode.t XML-LibXML-2.0104/t/35huge_mode.t --- XML-LibXML-2.0104-orig/t/35huge_mode.t 2013-04-13 22:33:58.000000000 +0300 +++ XML-LibXML-2.0104/t/35huge_mode.t 2013-09-03 02:23:51.267971120 +0300 @@ -9,10 +9,17 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More; use XML::LibXML; +if (XML::LibXML::LIBXML_VERSION() < 20700) { + plan skip_all => "XML_PARSE_HUGE option not supported for libxml2 < 2.7.0"; +} +else { + plan tests => 5; +} + my $benign_xml = <<'EOF'; <?xml version="1.0"?> <!DOCTYPE lolz [
Download (untitled) / with headers
text/plain 392b
Hi Yuriy, On Tue Sep 03 04:35:28 2013, yoreek wrote: Show quoted text
> Hi! > > I found that t/35huge_mode.t test fails with libxml2 < 2.7.0: >
thanks for the analysis and the patch. This was applied in revision 1316:ec44c2aed92aa8a086e82dd48decc36bd634a434 in the Mercurial repository. I'm not making a release now because I'm waiting for a pull request. Resolving this ticket. Regards, -- Shlomi Fish


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.