summaryrefslogtreecommitdiff
path: root/tests/test_parse_doctype.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse_doctype.cpp')
-rw-r--r--tests/test_parse_doctype.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_parse_doctype.cpp b/tests/test_parse_doctype.cpp
index 8976890..f8619fd 100644
--- a/tests/test_parse_doctype.cpp
+++ b/tests/test_parse_doctype.cpp
@@ -313,3 +313,12 @@ TEST(parse_doctype_error_toplevel)
CHECK(doc.load(STR("<node><!DOCTYPE></node>")).status == status_bad_doctype);
CHECK(doc.load(STR("<node><!DOCTYPE></node>"), parse_doctype).status == status_bad_doctype);
}
+
+TEST(parse_doctype_error_ignore)
+{
+ xml_document doc;
+ CHECK(doc.load(STR("<!DOCTYPE root [ <![IGNORE[ ")).status == status_bad_doctype);
+ CHECK(doc.load(STR("<!DOCTYPE root [ <![IGNORE[ "), parse_doctype).status == status_bad_doctype);
+ CHECK(doc.load(STR("<!DOCTYPE root [ <![IGNORE[ <![INCLUDE[")).status == status_bad_doctype);
+ CHECK(doc.load(STR("<!DOCTYPE root [ <![IGNORE[ <![INCLUDE["), parse_doctype).status == status_bad_doctype);
+}