From 8bf806c035373bd0723a85c0820cfd5c804bf6cd Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 9 Mar 2019 06:58:07 -0800 Subject: [PATCH] tests: Move control char tests to test_write.cpp Also fix code style. --- tests/test_control_chars.cpp | 9 --------- tests/test_write.cpp | 10 ++++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) delete mode 100644 tests/test_control_chars.cpp diff --git a/tests/test_control_chars.cpp b/tests/test_control_chars.cpp deleted file mode 100644 index 589f380..0000000 --- a/tests/test_control_chars.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "test.hpp" - -TEST_XML(control_chars_skip, "\f\t\n\x0F\x19") { - CHECK_NODE_EX(doc.first_child(), STR("\t\n\n"), STR(""), pugi::format_default | pugi::format_skip_control_chars); -} - -TEST_XML(control_chars_keep, "\f\t\n\x0F\x19") { - CHECK_NODE_EX(doc.first_child(), STR(" \t\n\n"), STR(""), pugi::format_default); -} diff --git a/tests/test_write.cpp b/tests/test_write.cpp index 57fa7fb..9050807 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -719,3 +719,13 @@ TEST_XML(write_throw_encoding, "") } } #endif + +TEST_XML(write_skip_control_chars, "\f\t\n\x0F\x19") +{ + CHECK_NODE_EX(doc.first_child(), STR("\t\n\n"), STR(""), pugi::format_default | pugi::format_skip_control_chars); +} + +TEST_XML(write_keep_control_chars, "\f\t\n\x0F\x19") +{ + CHECK_NODE_EX(doc.first_child(), STR(" \t\n\n"), STR(""), pugi::format_default); +}