Skip Menu |

This queue is for tickets about the App-xml_grep2 CPAN distribution.

Report information
The Basics
Id: 75042
Status: resolved
Priority: 0/
Queue: App-xml_grep2

People
Owner: Nobody in particular
Requestors: rrt [...] sc3d.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.13
Fixed in: 0.13



Subject: Test fails, but shouldn't
The following test fails, at least under Cygwin, but I think it shouldn't, because the XML output is correct, it just has different whitespace. # Failed test '-f 2' # at t/01-options.t line 50. # got: '<?xml version="1.0" encoding="UTF-8"?> # <xg2:result_set xmlns:xg2="http://xmltwig.com/tools/xml_grep2/"> # <e1 id="e1-2" att1="val2">text e1-2</e1> # </xg2:result_set> # ' # expected: '<?xml version="1.0" encoding="UTF-8"?> # <xg2:result_set xmlns:xg2="http://xmltwig.com/tools/xml_grep2/"> # <e1 id="e1-2" att1="val2"> # text e1-2 # </e1> # </xg2:result_set> # ' t/01-options.t .. 90/90 # Looks like you failed 1 test of 90. t/01-options.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/90 subtests
On Wed Feb 15 17:23:12 2012, rrt wrote: Show quoted text
> The following test fails, at least under Cygwin, but I think it > shouldn't, because the XML output is correct, it just has different > whitespace. > > # Failed test '-f 2' > # at t/01-options.t line 50. > # got: '<?xml version="1.0" encoding="UTF-8"?> > # <xg2:result_set xmlns:xg2="http://xmltwig.com/tools/xml_grep2/"> > # <e1 id="e1-2" att1="val2">text e1-2</e1> > # </xg2:result_set> > # ' > # expected: '<?xml version="1.0" encoding="UTF-8"?> > # <xg2:result_set xmlns:xg2="http://xmltwig.com/tools/xml_grep2/"> > # <e1 id="e1-2" att1="val2"> > # text e1-2 > # </e1> > # </xg2:result_set> > # ' > t/01-options.t .. 90/90 # Looks like you failed 1 test of 90. > t/01-options.t .. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/90 subtests
The problem seems to come from changes in the way XML::LibXML (or maybe libxml2) formats its output. Since I don't really want to track this kind of detail, which should not matter anyway since the problematic output is also XML, I essentially took whitespaces out of the tests, by comparing stripped version of the real and expected outputs. So the test is fixed in 0.14, which I just released. I also fixed the typos in the docs that you reported separately. Thanks for the report . __ mirod