Improve test coverage of the XML parser
Librsvg's XML parser is implemented using libxml2, and has a state machine to model the various nesting levels of XML elements.
However, there are some untested cases. For example, see the coverage for the start_element
function, and look for the uncovered lines in red. There is no coverage for starting an element when in the Context::Style
state; this means that if we have a <style>
, nothing tests for having an illegal sub-element like <style> <foo/> </style>
. In theory the rest of the state machine is built to detect and report that error, but we have no test case for that.
Edited by Federico Mena Quintero