Test Doctype marked PUBLIC but with no ID is rejected

This commit is contained in:
Rhodri James 2017-06-20 14:20:38 +01:00 committed by Sebastian Pipping
parent 5bbc983e7d
commit b78b96f6df

View file

@ -6706,6 +6706,14 @@ START_TEST(test_short_doctype)
}
END_TEST
START_TEST(test_short_doctype_2)
{
const char *text = "<!DOCTYPE doc PUBLIC></doc>";
expect_failure(text, XML_ERROR_SYNTAX,
"DOCTYPE without Public ID not rejected");
}
END_TEST
/*
* Namespaces tests.
*/
@ -12190,6 +12198,7 @@ make_suite(void)
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);
tcase_add_test(tc_basic, test_short_doctype_2);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,