mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-13 08:02:56 +00:00
Test invalid character in document local name is faulted
This commit is contained in:
parent
1346f5cd74
commit
b93735f15b
1 changed files with 12 additions and 0 deletions
|
@ -7028,6 +7028,17 @@ START_TEST(test_ns_utf16_doctype)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(test_ns_invalid_doctype)
|
||||
{
|
||||
const char *text =
|
||||
"<!DOCTYPE foo:!bad [ <!ENTITY bar 'baz' ]>\n"
|
||||
"<foo:!bad>&bar;</foo:!bad>";
|
||||
|
||||
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);
|
||||
|
|
Loading…
Add table
Reference in a new issue