Extend test coverage of XML_ResumeParser()

This commit is contained in:
Rhodri James 2017-02-08 12:06:30 +00:00 committed by Sebastian Pipping
parent b1ef084e82
commit 6975a78eb5

View file

@ -2684,6 +2684,12 @@ START_TEST(test_misc_alloc_ns_parse_buffer)
if (XML_ParseBuffer(parser, 0, XML_FALSE) != XML_STATUS_OK)
xml_failure(parser);
/* Check that resuming an unsuspended parser is faulted */
if (XML_ResumeParser(parser) != XML_STATUS_ERROR)
fail("Resuming unsuspended parser not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_NOT_SUSPENDED)
xml_failure(parser);
/* Get the parser into suspended state */
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
resumable = XML_TRUE;