Check entity parsing policy can't be changed mid-parse
@@ -1848,6 +1848,9 @@ START_TEST(test_user_parameters)
xml_failure(parser);
if (comment_count != 2)
fail("Comment handler not invoked enough times");
+ /* Ensure we can't change policy mid-parse */
+ if (XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_NEVER))
+ fail("Changed param entity parsing policy while parsing");
if (_XML_Parse_SINGLE_BYTES(parser, epilog, strlen(epilog),
XML_TRUE) == XML_STATUS_ERROR)
xml_failure(parser);
