From 2e0ed8284b7488f9664bf8dba9aae90688862cc3 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 14 Apr 2016 00:30:24 -0700 Subject: Remove extra space in an empty tag for format_raw When using format_raw the space in the empty tag () is the only character that does not have to be there; so format_raw almost results in a minimal XML but not quite. It's pretty unlikely that this is crucial for any users - the formatting change should be benign, and it's better to improve format_raw than to add yet another flag. Fixes #87. --- tests/test_write.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_write.cpp') diff --git a/tests/test_write.cpp b/tests/test_write.cpp index df7b0b1..341a4f0 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -192,12 +192,12 @@ TEST_XML(write_escape_unicode, "") { #ifdef PUGIXML_WCHAR_MODE #ifdef U_LITERALS - CHECK_NODE(doc, STR("")); + CHECK_NODE(doc, STR("")); #else - CHECK_NODE(doc, STR("")); + CHECK_NODE(doc, STR("")); #endif #else - CHECK_NODE(doc, STR("")); + CHECK_NODE(doc, STR("")); #endif } @@ -473,7 +473,7 @@ TEST(write_no_name_element) root.append_child(); root.append_child().append_child(node_pcdata).set_value(STR("text")); - CHECK_NODE(doc, STR("<:anonymous><:anonymous /><:anonymous>text")); + CHECK_NODE(doc, STR("<:anonymous><:anonymous/><:anonymous>text")); CHECK_NODE_EX(doc, STR("<:anonymous>\n\t<:anonymous />\n\t<:anonymous>text\n\n"), STR("\t"), format_default); } @@ -491,7 +491,7 @@ TEST(write_no_name_attribute) doc.append_child().set_name(STR("root")); doc.child(STR("root")).append_attribute(STR("")); - CHECK_NODE(doc, STR("")); + CHECK_NODE(doc, STR("")); } TEST(write_print_empty) @@ -596,7 +596,7 @@ TEST(write_pcdata_whitespace_fixedpoint) TEST_XML_FLAGS(write_mixed, "premidpostfin", parse_full) { - CHECK_NODE(doc, STR("premidpostfin")); + CHECK_NODE(doc, STR("premidpostfin")); CHECK_NODE_EX(doc, STR("\n\npremid\npostfin\n\n\n"), STR("\t"), 0); CHECK_NODE_EX(doc, STR("\n\t\n\tpremid\n\t\tpostfin\n\t\n\n"), STR("\t"), format_indent); } -- cgit v1.2.3