From 5596cbbbcc035f5ac0a16508ba535e1f57a59abb Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 20 Jun 2017 14:53:09 +0100 Subject: [PATCH] Test parameter entity with invalid keyword (not SYSTEM or PUBLIC) --- expat/tests/runtests.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 31a66a48..57e1d7fe 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -6742,6 +6742,19 @@ START_TEST(test_bad_entity) } END_TEST +/* Test unquoted value is faulted */ +START_TEST(test_bad_entity_2) +{ + const char *text = + "\n" + "]>\n" + ""; + expect_failure(text, XML_ERROR_SYNTAX, + "ENTITY without Public ID is not rejected"); +} +END_TEST + /* * Namespaces tests. */ @@ -12230,6 +12243,7 @@ make_suite(void) 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); + tcase_add_test(tc_basic, test_bad_entity_2); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,