]> granicus.if.org Git - libexpat/commitdiff
Add element declaration handler to nested group test
authorRhodri James <rhodri@kynesim.co.uk>
Mon, 13 Mar 2017 13:48:23 +0000 (13:48 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 22 Jul 2017 19:46:17 +0000 (21:46 +0200)
expat/tests/runtests.c

index f5c5ccf4bffff822c66cd7087d46ffbce6bf394b..7455fe7674c08b985e575b79ae1acf01cca5601c 100644 (file)
@@ -4222,12 +4222,16 @@ START_TEST(test_nested_groups)
     CharData storage;
 
     CharData_Init(&storage);
+    XML_SetElementDeclHandler(parser, dummy_element_decl_handler);
     XML_SetStartElementHandler(parser, record_element_start_handler);
     XML_SetUserData(parser, &storage);
+    dummy_handler_flags = 0;
     if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
                                 XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);
     CharData_CheckString(&storage, "doce");
+    if (dummy_handler_flags != DUMMY_ELEMENT_DECL_HANDLER_FLAG)
+        fail("Element handler not fired");
 }
 END_TEST