From 7d4bb8631d6cb4afc05417eea98632b8ca56049e Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 20 Jun 2017 14:56:12 +0100 Subject: [PATCH] Test parameter entity marked PUBLIC but with no ID --- expat/tests/runtests.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 57e1d7fe..4d7863ea 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -6755,6 +6755,18 @@ START_TEST(test_bad_entity_2) } END_TEST +START_TEST(test_bad_entity_3) +{ + const char *text = + "\n" + "]>\n" + ""; + expect_failure(text, XML_ERROR_SYNTAX, + "Parameter ENTITY without Public ID is not rejected"); +} +END_TEST + /* * Namespaces tests. */ @@ -12244,6 +12256,7 @@ make_suite(void) tcase_add_test(tc_basic, test_long_doctype); tcase_add_test(tc_basic, test_bad_entity); tcase_add_test(tc_basic, test_bad_entity_2); + tcase_add_test(tc_basic, test_bad_entity_3); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace, -- 2.40.0