From 98c1385bba3f17d6ae0acb7e40f2d227b37e005b Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Thu, 15 Jun 2017 18:15:51 +0100 Subject: [PATCH] Test that more than one colon in an element name is rejected --- expat/tests/runtests.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 72caa0d3..03a6b90c 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -6790,6 +6790,16 @@ START_TEST(test_ns_double_colon) } END_TEST +START_TEST(test_ns_double_colon_element) +{ + const char *text = + ""; + + expect_failure(text, XML_ERROR_INVALID_TOKEN, + "Double colon in element name not faulted"); +} +END_TEST + /* Test that non-name characters after a colon are rejected */ START_TEST(test_ns_bad_attr_leafname) { @@ -11541,6 +11551,7 @@ make_suite(void) tcase_add_test(tc_namespace, test_ns_extremely_long_prefix); tcase_add_test(tc_namespace, test_ns_unknown_encoding_success); tcase_add_test(tc_namespace, test_ns_double_colon); + tcase_add_test(tc_namespace, test_ns_double_colon_element); tcase_add_test(tc_namespace, test_ns_bad_attr_leafname); tcase_add_test(tc_namespace, test_ns_utf16_leafname);