summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/test.cpp b/src/test.cpp
index a8c0276..958e894 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -52,6 +52,11 @@ int main()
assert(from_ascii == "couc�ou");
std::cout << from_ascii << std::endl;
+ std::string without_ctrl_char("𤭢€¢$");
+ assert(utils::remove_invalid_xml_chars(without_ctrl_char) == without_ctrl_char);
+ assert(utils::remove_invalid_xml_chars(in) == in);
+ assert(utils::remove_invalid_xml_chars("\acouco\u0008u\uFFFEt\uFFFFe\r\n♥") == "coucoute\r\n♥");
+
/**
* Utils
*/
@@ -156,7 +161,7 @@ int main()
/**
* Config
*/
- std::cout << color << "Testing JID parsing…" << reset << std::endl;
+ std::cout << color << "Testing config…" << reset << std::endl;
Config::filename = "test.cfg";
Config::file_must_exist = false;
Config::set("coucou", "bonjour");