summaryrefslogtreecommitdiff
path: root/tests/test_write.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-26 19:01:36 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-09-26 19:01:36 +0000
commit630be2edb3110b9627718bd7b735348e4940fdd4 (patch)
treeb8bba89deaed121beac5df936463323fd27097fe /tests/test_write.cpp
parent605ab1b145968dd9ab2a07536493cbeac9311ccc (diff)
tests: Added node_doctype and parse_doctype tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@757 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_write.cpp')
-rw-r--r--tests/test_write.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_write.cpp b/tests/test_write.cpp
index 4237739..0904b21 100644
--- a/tests/test_write.cpp
+++ b/tests/test_write.cpp
@@ -63,6 +63,12 @@ TEST_XML_FLAGS(write_declaration, "<?xml version='2.0'?>", parse_default | parse
CHECK_NODE_EX(doc, STR("<?xml version=\"2.0\"?>\n"), STR(""), 0);
}
+TEST_XML_FLAGS(write_doctype, "<!DOCTYPE id [ foo ]>", parse_default | parse_doctype)
+{
+ CHECK_NODE(doc, STR("<!DOCTYPE id [ foo ]>"));
+ CHECK_NODE_EX(doc, STR("<!DOCTYPE id [ foo ]>\n"), STR(""), 0);
+}
+
TEST_XML(write_escape, "<node attr=''>text</node>")
{
doc.child(STR("node")).attribute(STR("attr")) = STR("<>'\"&\x04\r\n\t");