summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2014-06-08 05:35:36 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-06-08 05:35:36 +0200
commit3d9183557f3ad9b599c812c03a445453e7d4f703 (patch)
treeb084919560ecae720ceb43efc0c3dcf2e1434b7e /src/test.cpp
parent2d5e2fdcf69416bd93982e1432b4d2b744da203e (diff)
downloadbiboumi-3d9183557f3ad9b599c812c03a445453e7d4f703.tar.gz
biboumi-3d9183557f3ad9b599c812c03a445453e7d4f703.tar.bz2
biboumi-3d9183557f3ad9b599c812c03a445453e7d4f703.tar.xz
biboumi-3d9183557f3ad9b599c812c03a445453e7d4f703.zip
Convert \n to <br/> in xhtml body
fix #2539
Diffstat (limited to 'src/test.cpp')
-rw-r--r--src/test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test.cpp b/src/test.cpp
index 9c77376..216608a 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -258,6 +258,10 @@ int main()
assert(cleaned_up == "0e46ab by Pierre Dindon [0|1|0] http://example.net/Ojrh4P media: avoid pop-in effect when loading thumbnails by specifying an explicit size");
assert(xhtml->to_string() == "<body xmlns='http://www.w3.org/1999/xhtml'>0e46ab by <span style='color:green;'>Pierre Dindon</span> [<span style='color:lightgreen;'>0</span>|<span style='color:lightgreen;'>1</span>|<span style='color:indianred;'>0</span>] <span style='text-decoration:underline;'/><span style='text-decoration:underline;color:blue;'>http://example.net/Ojrh4P</span><span style='text-decoration:underline;'/> media: avoid pop-in effect when loading thumbnails by specifying an explicit size</body>");
+ std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("test\ncoucou");
+ assert(cleaned_up == "test\ncoucou");
+ assert(xhtml->to_string() == "<body xmlns='http://www.w3.org/1999/xhtml'>test<br/>coucou</body>");
+
/**
* JID parsing
*/