Skip Menu |
 

This queue is for tickets about the TAP-Harness-JUnit CPAN distribution.

Report information
The Basics
Id: 98582
Status: resolved
Priority: 0/
Queue: TAP-Harness-JUnit

People
Owner: JLAVALLEE [...] cpan.org
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

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



Subject: Filter/escape invalid XML chars
Download (untitled) / with headers
text/plain 858b
The TAP output is put verbatim in <system-out>. But not all characters are allowed in XML. From the XML specification: http://www.w3.org/TR/xml/#charsets Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] This means that if the TAP output contains '\0' (I had this when using Test::More::is() to check binary data), the generated JUnit file currently is invalid. Consequence: Jenkins fails to load it (because its XML parser is strictly compliant) and the build is reported as "UNSTABLE". TAP::Harness::JUnit should: - filter the TAP output for invalid XML chars - report an additional testcase that is a failure "invalid XML chars has been detected in TAP output" (rationale: we had to alter the TAP output, it would be better for the user to fix his tests) -- Olivier Mengué - http://perlresume.org/DOLMEN
Download (untitled) / with headers
text/plain 546b
the xmlsafe() subroutine filters invalid characters. Unfortunately it neglected to handle null. I've fixed that. I'm not convinced does the right thing with invalid multi-byte characters, but I'm closing this bug for the time being. TAP-Harness-JUnit-0.42 is on it's way to CPAN with the fix. Since there was already support for filtering invalid characters, and the existing support did not add an additional test, I did not make any changes in this regard. I'm not sure it would be proper to report a failure, as the TAP output is valid.


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.