}
END_TEST
+/* Slightly bizarrely, the library seems to silently ignore entity
+ * definitions for predefined entities, even when they are wrong. The
+ * language of the XML 1.0 spec is somewhat unhelpful as to what ought
+ * to happen, so this is currently treated as acceptable.
+ */
+START_TEST(test_predefined_entity_redefinition)
+{
+ const char *text =
+ "<!DOCTYPE doc [\n"
+ "<!ENTITY apos 'foo'>\n"
+ "]>\n"
+ "<doc>'</doc>";
+ run_character_check(text, "'");
+}
+END_TEST
+
/*
* Namespaces tests.
*/
tcase_add_test(tc_basic, test_ext_entity_value_abort);
tcase_add_test(tc_basic, test_bad_public_doctype);
tcase_add_test(tc_basic, test_attribute_enum_value);
+ tcase_add_test(tc_basic, test_predefined_entity_redefinition);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,