mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-13 08:02:56 +00:00
Test overly brief doctype is rejected
This commit is contained in:
parent
63dc602a12
commit
5bbc983e7d
1 changed files with 12 additions and 0 deletions
|
@ -6695,6 +6695,17 @@ START_TEST(test_entity_public_utf16_le)
|
|||
}
|
||||
END_TEST
|
||||
|
||||
/* Test that a doctype with neither an internal nor external subset is
|
||||
* faulted
|
||||
*/
|
||||
START_TEST(test_short_doctype)
|
||||
{
|
||||
const char *text = "<!DOCTYPE doc></doc>";
|
||||
expect_failure(text, XML_ERROR_INVALID_TOKEN,
|
||||
"DOCTYPE without subset not rejected");
|
||||
}
|
||||
END_TEST
|
||||
|
||||
/*
|
||||
* Namespaces tests.
|
||||
*/
|
||||
|
@ -12178,6 +12189,7 @@ make_suite(void)
|
|||
tcase_add_test(tc_basic, test_entity_in_utf16_le_attr);
|
||||
tcase_add_test(tc_basic, test_entity_public_utf16_be);
|
||||
tcase_add_test(tc_basic, test_entity_public_utf16_le);
|
||||
tcase_add_test(tc_basic, test_short_doctype);
|
||||
|
||||
suite_add_tcase(s, tc_namespace);
|
||||
tcase_add_checked_fixture(tc_namespace,
|
||||
|
|
Loading…
Add table
Reference in a new issue