From 61db6a8a936a51ede918fc6483e1ce37bb0684eb Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Fri, 16 Jun 2017 17:46:08 +0100 Subject: [PATCH] Test document name of "1*" is rejected in a doctype declaration --- expat/tests/runtests.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 19850274..227ddbc8 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -6288,6 +6288,17 @@ START_TEST(test_bad_doctype_plus) } END_TEST +START_TEST(test_bad_doctype_star) +{ + const char *text = + " ]>\n" + "<1*>&foo;"; + + expect_failure(text, XML_ERROR_INVALID_TOKEN, + "'+' in document name not faulted"); +} +END_TEST + /* * Namespaces tests. */ @@ -11756,6 +11767,7 @@ make_suite(void) tcase_add_test(tc_basic, test_bad_doctype); tcase_add_test(tc_basic, test_bad_doctype_utf16); tcase_add_test(tc_basic, test_bad_doctype_plus); + tcase_add_test(tc_basic, test_bad_doctype_star); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace, -- 2.40.0