]> granicus.if.org Git - libexpat/commitdiff
Add CDATA section handlers for increased test coverage
authorRhodri James <rhodri@kynesim.co.uk>
Tue, 14 Feb 2017 17:57:58 +0000 (17:57 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 16 Jul 2017 16:41:03 +0000 (18:41 +0200)
expat/tests/runtests.c

index f40d3b25aa6eeccf331d6cb1cad24ffcd1f7184f..726c2a5fd610fbe8c676a3972ffac6419f0321d7 100644 (file)
@@ -1584,6 +1584,9 @@ START_TEST(test_good_cdata_ascii)
     CharData_Init(&storage);
     XML_SetUserData(parser, &storage);
     XML_SetCharacterDataHandler(parser, accumulate_characters);
+    /* Add start and end handlers for coverage */
+    XML_SetStartCdataSectionHandler(parser, dummy_start_cdata_handler);
+    XML_SetEndCdataSectionHandler(parser, dummy_end_cdata_handler);
 
     if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) == XML_STATUS_ERROR)
         xml_failure(parser);