From 1649b2e6b89c5eabd5ccf68a815d22ceaed0ddee Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Wed, 9 Nov 2016 09:12:36 -0800 Subject: tests: Add a test for format_no_empty_element_tags --- tests/test_write.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_write.cpp b/tests/test_write.cpp index bf45e31..8fbcc27 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -601,6 +601,13 @@ TEST_XML_FLAGS(write_mixed, "premid\n\t\tpostfin\n\t\n\n"), STR("\t"), format_indent); } +TEST_XML(write_no_empty_element_tags, "text") +{ + CHECK_NODE(doc, STR("text")); + CHECK_NODE_EX(doc, STR("text"), STR("\t"), format_raw | format_no_empty_element_tags); + CHECK_NODE_EX(doc, STR("\n\t\n\ttext\n\t\n\n"), STR("\t"), format_indent | format_no_empty_element_tags); +} + #ifndef PUGIXML_NO_EXCEPTIONS struct throwing_writer: pugi::xml_writer { -- cgit v1.2.3