if (XML_ParseBuffer(parser, 0, XML_FALSE) != XML_STATUS_OK)
xml_failure(parser);
+ /* Try silly buffer lengths */
+ if (XML_GetBuffer(parser, -12) != NULL)
+ fail("Negative length buffer not failed");
+
/* Get the parser into suspended state */
XML_SetCharacterDataHandler(parser, clearing_aborting_character_handler);
resumable = XML_TRUE;
fail("Suspended XML_ParseBuffer not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_SUSPENDED)
xml_failure(parser);
+ if (XML_GetBuffer(parser, strlen(text)) != NULL)
+ fail("Suspended XML_GetBuffer not faulted");
/* Get it going again and complete the world */
XML_SetCharacterDataHandler(parser, NULL);
fail("Post-finishing XML_ParseBuffer not faulted");
if (XML_GetErrorCode(parser) != XML_ERROR_FINISHED)
xml_failure(parser);
+ if (XML_GetBuffer(parser, strlen(text)) != NULL)
+ fail("Post-finishing XML_GetBuffer not faulted");
}
END_TEST