summaryrefslogtreecommitdiff
path: root/src/test.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-04-17 20:37:46 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-04-17 20:37:46 +0200
commitbd7936bdfe799d6b665c4b2bd30a5210592d9ae4 (patch)
treefa6238c8249e2117fab83a13a63ef64c8a1db676 /src/test.cpp
parent9683f0a0b2789c97a2864e07c55f7ce1ab8c0e89 (diff)
downloadbiboumi-bd7936bdfe799d6b665c4b2bd30a5210592d9ae4.tar.gz
biboumi-bd7936bdfe799d6b665c4b2bd30a5210592d9ae4.tar.bz2
biboumi-bd7936bdfe799d6b665c4b2bd30a5210592d9ae4.tar.xz
biboumi-bd7936bdfe799d6b665c4b2bd30a5210592d9ae4.zip
No more missing text when converting IRC colors to xhtml-im
fix #2496
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 e66c4ad..553c3ce 100644
--- a/src/test.cpp
+++ b/src/test.cpp
@@ -144,6 +144,10 @@ int main()
std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim(",");
assert(xhtml && !xhtml->has_children() && cleaned_up.empty());
+ std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("[\x1D13dolphin-emu/dolphin\x1D] 03foo commented on #283 (Add support for the guide button to XInput): 02http://example.com");
+ assert(xhtml->to_string() == "<body xmlns='http://www.w3.org/1999/xhtml'>[<span style='font-style:italic;'/><span style='font-style:italic;color:lightmagenta;'>dolphin-emu/dolphin</span><span style='color:lightmagenta;'>] </span><span style='color:green;'>foo</span> commented on #283 (Add support for the guide button to XInput): <span style='text-decoration:underline;'/><span style='text-decoration:underline;color:blue;'>http://example.com</span><span style='text-decoration:underline;'/></body>");
+ assert(cleaned_up == "[dolphin-emu/dolphin] foo commented on #283 (Add support for the guide button to XInput): http://example.com");
+
/**
* JID parsing
*/