]> granicus.if.org Git - libexpat/commitdiff
Test incomplete token in epilog
authorRhodri James <rhodri@kynesim.co.uk>
Thu, 16 Mar 2017 16:51:17 +0000 (16:51 +0000)
committerSebastian Pipping <sebastian@pipping.org>
Sat, 22 Jul 2017 20:49:13 +0000 (22:49 +0200)
expat/tests/runtests.c

index 456e01e0e75a19ac6907d29c4b87f5e0419085fc..65b084e7b19cbf767c3d147f669bfe13e6d8c015 100644 (file)
@@ -4566,6 +4566,15 @@ START_TEST(test_abort_epilog)
 }
 END_TEST
 
+START_TEST(test_unfinished_epilog)
+{
+    const char *text = "<doc></doc><";
+
+    expect_failure(text, XML_ERROR_UNCLOSED_TOKEN,
+                   "Incomplete epilog entry not faulted");
+}
+END_TEST
+
 
 /*
  * Namespaces tests.
@@ -7830,6 +7839,7 @@ make_suite(void)
     tcase_add_test(tc_basic, test_undefined_ext_entity_in_external_dtd);
     tcase_add_test(tc_basic, test_suspend_xdecl);
     tcase_add_test(tc_basic, test_abort_epilog);
+    tcase_add_test(tc_basic, test_unfinished_epilog);
 
     suite_add_tcase(s, tc_namespace);
     tcase_add_checked_fixture(tc_namespace,