mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-13 08:02:56 +00:00
Test document name of "1?" is rejected in doctype declaration
This commit is contained in:
parent
61db6a8a93
commit
c73e63de42
1 changed files with 12 additions and 0 deletions
|
@ -6299,6 +6299,17 @@ START_TEST(test_bad_doctype_star)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
START_TEST(test_bad_doctype_query)
|
||||
{
|
||||
const char *text =
|
||||
"<!DOCTYPE 1? [ <!ENTITY foo 'bar'> ]>\n"
|
||||
"<1?>&foo;</1?>";
|
||||
|
||||
expect_failure(text, XML_ERROR_INVALID_TOKEN,
|
||||
"'+' in document name not faulted");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
/*
|
||||
* Namespaces tests.
|
||||
*/
|
||||
|
@ -11768,6 +11779,7 @@ make_suite(void)
|
|||
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);
|
||||
tcase_add_test(tc_basic, test_bad_doctype_query);
|
||||
|
||||
suite_add_tcase(s, tc_namespace);
|
||||
tcase_add_checked_fixture(tc_namespace,
|
||||
|
|
Loading…
Add table
Reference in a new issue