From 5d66ae9fb952a0954df5ae35df93191e7c73feac Mon Sep 17 00:00:00 2001 From: halex2005 Date: Tue, 14 Apr 2015 00:56:42 +0500 Subject: add tests for aligning each attribute on next line --- tests/test_write.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'tests/test_write.cpp') diff --git a/tests/test_write.cpp b/tests/test_write.cpp index af4acf4..d280840 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -21,6 +21,21 @@ TEST_XML(write_indent, "text") CHECK_NODE_EX(doc, STR("\n\t\n\t\ttext\n\t\n\n"), STR("\t"), format_indent); } +TEST_XML(write_indent_attribute, "text") +{ + CHECK_NODE_EX(doc, STR("\n\t\n\t\ttext\n\t\n\n"), STR("\t"), format_indent_attributes); +} + +TEST_XML(write_indent_attribute_empty_tag, "") +{ + CHECK_NODE_EX(doc, STR("\n"), STR("\t"), format_indent_attributes); +} + +TEST_XML_FLAGS(write_indent_attribute_on_declaration, "", pugi::parse_full) +{ + CHECK_NODE_EX(doc, STR("\n\n"), STR("\t"), format_indent_attributes); +} + TEST_XML(write_pcdata, "text") { CHECK_NODE_EX(doc, STR("\n\t\n\t\ttext\n\n"), STR("\t"), format_indent); @@ -360,7 +375,7 @@ TEST(write_encoding_huge_invalid) TEST(write_unicode_escape) { char s_utf8[] = "<\xE2\x82\xAC \xC2\xA2='\"\xF0\xA4\xAD\xA2 \"'>&\x14\xF0\xA4\xAD\xA2<"; - + xml_document doc; CHECK(doc.load_buffer(s_utf8, sizeof(s_utf8), parse_default, encoding_utf8)); -- cgit v1.2.3