Skip Menu |

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

Report information
The Basics
Id: 72092
Status: resolved
Priority: 0/
Queue: XML-DifferenceMarkup

People
Owner: vbarta [...] mangrove.cz
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.03
Fixed in: 1.04



Subject: A test in 01diff.t fails
t/01diff.t (Wstat: 256 Tests: 15 Failed: 1) Failed test: 9 Non-zero exit status: 1 Files=1, Tests=15, 31 wallclock secs ( 0.03 usr 0.02 sys + 0.09 cusr 0.05 csys = 0.19 CPU) Result: FAIL [test@fedora-17 XML-DifferenceMarkup-1.03]$ prove --blib t/01diff.t t/01diff.t .. 9/15 # Failed test 'testdata/diff/08?.xml' # at t/01diff.t line 47. # got: '<?xml version="1.0"?> # <dm:diff xmlns:dm="http://www.locus.cz/diffmark"> # <html dm:update="root"> # <dm:copy count="1"/> # </html> # </dm:diff> # ' # expected: '<?xml version="1.0"?> # <dm:diff xmlns:dm="http://www.locus.cz/diffmark"> # <dm:delete> # <root/> # </dm:delete> # <dm:insert> # <html xmlns="http://www.w3.org/1999/xhtml"/> # </dm:insert> # </dm:diff> # ' # Looks like you failed 1 test of 15. t/01diff.t .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/15 subtests
From: ppisar [...] redhat.com
Dne Út 01.lis.2011 12:03:03, ppisar napsal(a): Show quoted text
> t/01diff.t (Wstat: 256 Tests: 15 Failed: 1) > Failed test: 9 > Non-zero exit status: 1 > Files=1, Tests=15, 31 wallclock secs ( 0.03 usr 0.02 sys + 0.09 cusr > 0.05 csys = 0.19 CPU) > Result: FAIL > [test@fedora-17 XML-DifferenceMarkup-1.03]$ prove --blib t/01diff.t > t/01diff.t .. 9/15 > # Failed test 'testdata/diff/08?.xml' > # at t/01diff.t line 47. > # got: '<?xml version="1.0"?> > # <dm:diff xmlns:dm="http://www.locus.cz/diffmark"> > # <html dm:update="root"> > # <dm:copy count="1"/> > # </html> > # </dm:diff> > # ' > # expected: '<?xml version="1.0"?> > # <dm:diff xmlns:dm="http://www.locus.cz/diffmark"> > # <dm:delete> > # <root/> > # </dm:delete> > # <dm:insert> > # <html xmlns="http://www.w3.org/1999/xhtml"/> > # </dm:insert> > # </dm:diff> > # ' > # Looks like you failed 1 test of 15. > t/01diff.t .. Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/15 subtests
This seems like a bug in diffmark-0.8. It gives the same output.
It's arguably a problem of libxml2, which exports a function xmlKeepBlanksDefault for removing whitespace nodes from the parsed document (see http://xmlsoft.org/html/libxml-parser.html#xmlKeepBlanksDefault ), but apparently not in quite the same way between different libxml2 versions. The libxml2 reference suggests remedies, but I don't think they really belong into XML::DifferenceMarkup, which doesn't even call xmlKeepBlanksDefault internally (although its docs recommend that users do it). People who feel strongly about their document's whitespace will probably be better off normalizing it in an extra step before creating the diff anyway; I'm "solving" the problem by just changing the testcase.