Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: TODDR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.79
Fixed in: (no value)



Subject: t/19die_on_invalid_utf8_rt_58848.t assumes errors will be objects
Download (untitled) / with headers
text/plain 269b
Similar to RT 69070, The test in 19die_on_invalid_utf8_rt_58848.t assumes that errors thrown via $@ will be an object. This causes breaks on older versions of libxml. Especially since we're stringifying the object anyways, I would suggest this as the revised test:
Subject: patch.txt
Download patch.txt
text/plain 596b
diff --git a/t/19die_on_invalid_utf8_rt_58848.t b/t/19die_on_invalid_utf8_rt_58848.t index d0eeb9a..4208a72 100644 --- a/t/19die_on_invalid_utf8_rt_58848.t +++ b/t/19die_on_invalid_utf8_rt_58848.t @@ -13,13 +13,8 @@ use XML::LibXML; XML::LibXML->new->parse_file('example/thedieline.rss'); }; - my $err = $@; - - # TEST - isa_ok($err, 'XML::LibXML::Error', "Exception is XML::LibXML::Error"); - # TEST - like ("$err", qr{parser error : Input is not proper UTF-8}, + like ("$@", qr{parser error : Input is not proper UTF-8}, 'Parser error.', ); }
Oops need to lower the test count from 2 to 1. (My bad)
Download (untitled) / with headers
text/plain 100b
Thanks! I fixed it in the repository and will release a new version soon. 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.