From 6b69701cdde71a96a73daa4f4d0ec39530b68a80 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Thu, 22 Jul 2010 13:13:31 +0000 Subject: [PATCH] tests: Added more CDATA writing tests git-svn-id: http://pugixml.googlecode.com/svn/trunk@617 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_write.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_write.cpp b/tests/test_write.cpp index b7d8412..c549a82 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -31,6 +31,20 @@ TEST_XML(write_cdata, "") CHECK_NODE_EX(doc, STR("\n"), STR(""), 0); } +TEST_XML(write_cdata_empty, "") +{ + CHECK_NODE(doc, STR("")); + CHECK_NODE_EX(doc, STR("\n"), STR(""), 0); +} + +TEST_XML(write_cdata_escape, "") +{ + CHECK_NODE(doc, STR("")); + + doc.first_child().set_value(STR("1]]>2]]>3")); + CHECK_NODE(doc, STR("2]]]]>3]]>")); +} + TEST_XML_FLAGS(write_comment, "", parse_default | parse_comments) { CHECK_NODE(doc, STR(""));