From: Rhodri James Date: Tue, 20 Jun 2017 13:40:26 +0000 (+0100) Subject: Test Entity declaration marked PUBLIC with no ID X-Git-Tag: R_2_2_3~22^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81a3f2f73f3a134f0b0bef1fad4cca127ec979c8;p=libexpat Test Entity declaration marked PUBLIC with no ID --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index e3404750..31a66a48 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -6730,6 +6730,18 @@ START_TEST(test_long_doctype) } END_TEST +START_TEST(test_bad_entity) +{ + const char *text = + "\n" + "]>\n" + ""; + expect_failure(text, XML_ERROR_SYNTAX, + "ENTITY without Public ID is not rejected"); +} +END_TEST + /* * Namespaces tests. */ @@ -12217,6 +12229,7 @@ make_suite(void) tcase_add_test(tc_basic, test_short_doctype_2); tcase_add_test(tc_basic, test_short_doctype_3); tcase_add_test(tc_basic, test_long_doctype); + tcase_add_test(tc_basic, test_bad_entity); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,