From b93735f15b0c80ef07f4bdbff9e4ff5b810f489c Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Fri, 16 Jun 2017 17:04:18 +0100 Subject: [PATCH] Test invalid character in document local name is faulted --- expat/tests/runtests.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 635ca695..9a17f1be 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -7028,6 +7028,17 @@ START_TEST(test_ns_utf16_doctype) } END_TEST +START_TEST(test_ns_invalid_doctype) +{ + const char *text = + "\n" + "&bar;"; + + expect_failure(text, XML_ERROR_INVALID_TOKEN, + "Invalid character in document local 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) @@ -11756,6 +11767,7 @@ make_suite(void) tcase_add_test(tc_namespace, test_ns_utf16_leafname); 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); suite_add_tcase(s, tc_misc); tcase_add_checked_fixture(tc_misc, NULL, basic_teardown); -- 2.40.0