From f38b31a63ee203e53d1135a87f1b4e9faaf7dd3f Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Sat, 9 Nov 2013 21:40:29 +0100 Subject: Remove IRC colors from the body when forwarding it to XMPP --- src/test.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/test.cpp') diff --git a/src/test.cpp b/src/test.cpp index e3bfa55..d110868 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -6,6 +6,7 @@ #include +#include #include #include @@ -39,5 +40,9 @@ int main() // wrong charset) std::string from_ascii = utils::convert_to_utf8(original_latin1, "US-ASCII"); assert(from_ascii == "couc�ou"); + + std::string coucou("\u0002\u0002COUCOU\u0003"); + remove_irc_colors(coucou); + assert(coucou == "COUCOU"); return 0; } -- cgit v1.2.3