diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-19 15:38:10 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2010-10-19 15:38:10 +0000 |
commit | a18385e1e09794f8ed46d99883e1e00bf554f69a (patch) | |
tree | 4439a55ad6ee9fdd258c9832b813ca9db276f804 /tests | |
parent | b979d4c2bd1e8f445befd53ea8357b594f1ca3b2 (diff) |
If an element node has the only child, and it is of CDATA type, then the extra indentation is omitted (previously this behavior only held for PCDATA children)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@770 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_write.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_write.cpp b/tests/test_write.cpp index 0904b21..3871bf6 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -45,6 +45,13 @@ TEST_XML(write_cdata_escape, "<![CDATA[value]]>") CHECK_NODE(doc, STR("<![CDATA[1]]]]><![CDATA[>2]]]]><![CDATA[>3]]>")); } +TEST_XML(write_cdata_inner, "<node><![CDATA[value]]></node>") +{ + CHECK_NODE(doc, STR("<node><![CDATA[value]]></node>")); + CHECK_NODE_EX(doc, STR("<node><![CDATA[value]]></node>\n"), STR(""), 0); +} + + TEST_XML_FLAGS(write_comment, "<!--text-->", parse_default | parse_comments) { CHECK_NODE(doc, STR("<!--text-->")); |