Test document name of "1+" is rejected in doctype

Following a codepath that requires a character valid in a name but
not at the start (or '-' or ':') followed by a '+'
This commit is contained in:
Rhodri James 2017-06-16 17:34:18 +01:00 committed by Sebastian Pipping
parent b003c9fea5
commit bb60b30a68

View File

@ -6277,6 +6277,17 @@ START_TEST(test_bad_doctype_utf16)
}
END_TEST
START_TEST(test_bad_doctype_plus)
{
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.
*/
@ -11744,6 +11755,7 @@ make_suite(void)
tcase_add_test(tc_basic, test_bad_attr_desc_keyword_utf16);
tcase_add_test(tc_basic, test_bad_doctype);
tcase_add_test(tc_basic, test_bad_doctype_utf16);
tcase_add_test(tc_basic, test_bad_doctype_plus);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,