#3636 closed Feature Requests (fixed)
make XML output of test report XML-compliant
Reported by: | Owned by: | Gennadiy Rozental | |
---|---|---|---|
Milestone: | Boost 1.41.0 | Component: | test |
Version: | Boost 1.40.0 | Severity: | Cosmetic |
Keywords: | Cc: | akos@… |
Description
I have a suggestion for the XML output generated by the boost unit test framework: currently, if tests fail, the message detailing the failure of the test is put in verbatim as a test element into the XML output. This can be problematic, if the output contains XML-like structures, like text that looks like an XML element, or invalid characters.
thus, I'd suggest enclosing such output in a CDATA section, that would ensure that the generated XML file is indeed always well formed XML. see more here: http://www.w3.org/TR/REC-xml/#sec-cdata-sect - but basically this would mean printing the failures like this:
<![CDATA[ reason of the failure... ]]>
(In [57854]) Use CData to print error message. Fixes #3636