mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-27 13:33:17 +08:00
tests: Added more CDATA writing tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@617 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
64d98cdcfc
commit
6b69701cdd
@ -31,6 +31,20 @@ TEST_XML(write_cdata, "<![CDATA[value]]>")
|
||||
CHECK_NODE_EX(doc, STR("<![CDATA[value]]>\n"), STR(""), 0);
|
||||
}
|
||||
|
||||
TEST_XML(write_cdata_empty, "<![CDATA[]]>")
|
||||
{
|
||||
CHECK_NODE(doc, STR("<![CDATA[]]>"));
|
||||
CHECK_NODE_EX(doc, STR("<![CDATA[]]>\n"), STR(""), 0);
|
||||
}
|
||||
|
||||
TEST_XML(write_cdata_escape, "<![CDATA[value]]>")
|
||||
{
|
||||
CHECK_NODE(doc, STR("<![CDATA[value]]>"));
|
||||
|
||||
doc.first_child().set_value(STR("1]]>2]]>3"));
|
||||
CHECK_NODE(doc, STR("<![CDATA[1]]]]><![CDATA[>2]]]]><![CDATA[>3]]>"));
|
||||
}
|
||||
|
||||
TEST_XML_FLAGS(write_comment, "<!--text-->", parse_default | parse_comments)
|
||||
{
|
||||
CHECK_NODE(doc, STR("<!--text-->"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user