From 27109cd6267c08e36ae8dc5b526f5878349fea85 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 21 Sep 2014 21:52:19 +0000 Subject: tests: Add test for custom indentation strings git-svn-id: https://pugixml.googlecode.com/svn/trunk@1016 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_write.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_write.cpp b/tests/test_write.cpp index 449ad97..1009d4e 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -427,3 +427,13 @@ TEST(write_stackless) CHECK_NODE(doc, data.c_str()); } + +TEST_XML(write_indent_custom, "text") +{ + CHECK_NODE_EX(doc, STR("\n\ntext\n\n\n"), STR(""), format_indent); + CHECK_NODE_EX(doc, STR("\nA\nAAtext\nA\n\n"), STR("A"), format_indent); + CHECK_NODE_EX(doc, STR("\nAB\nABABtext\nAB\n\n"), STR("AB"), format_indent); + CHECK_NODE_EX(doc, STR("\nABC\nABCABCtext\nABC\n\n"), STR("ABC"), format_indent); + CHECK_NODE_EX(doc, STR("\nABCD\nABCDABCDtext\nABCD\n\n"), STR("ABCD"), format_indent); + CHECK_NODE_EX(doc, STR("\nABCDE\nABCDEABCDEtext\nABCDE\n\n"), STR("ABCDE"), format_indent); +} -- cgit v1.2.3