From: Rhodri James Date: Fri, 16 Jun 2017 16:19:31 +0000 (+0100) Subject: Test two colons in the document name in a doctype is rejected X-Git-Tag: R_2_2_3~22^2~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b003c9fea54024551937db804fd41facc63b5abe;p=libexpat Test two colons in the document name in a doctype is rejected --- diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 9a17f1be..8d1ceaca 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -7039,6 +7039,17 @@ START_TEST(test_ns_invalid_doctype) } END_TEST +START_TEST(test_ns_double_colon_doctype) +{ + const char *text = + "\n" + "&bar;"; + + expect_failure(text, XML_ERROR_SYNTAX, + "Double colon in document name not faulted"); +} +END_TEST + /* Control variable; the number of times duff_allocator() will successfully allocate */ #define ALLOC_ALWAYS_SUCCEED (-1) #define REALLOC_ALWAYS_SUCCEED (-1) @@ -11768,6 +11779,7 @@ make_suite(void) tcase_add_test(tc_namespace, test_ns_utf16_element_leafname); tcase_add_test(tc_namespace, test_ns_utf16_doctype); tcase_add_test(tc_namespace, test_ns_invalid_doctype); + tcase_add_test(tc_namespace, test_ns_double_colon_doctype); suite_add_tcase(s, tc_misc); tcase_add_checked_fixture(tc_misc, NULL, basic_teardown);