diff libpurple/tests/test_yahoo_util.c @ 28332:43200ff042ad

Fix sending /buzz on yahoo. Yahoo buzzes are '<ding>' sent as normal IMs. 'ding' is an unknown tag, and we were stripping unknown tags. So instead, send the tags we don't recognize as they are without stripping/changing them. ... or perhaps we could treat 'ding' as a known tag instead? Added test cases.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 06 Oct 2009 15:56:43 +0000
parents 1d2425f2e4ff
children f4a95b3424d1
line wrap: on
line diff
--- a/libpurple/tests/test_yahoo_util.c	Sun Oct 04 18:01:35 2009 +0000
+++ b/libpurple/tests/test_yahoo_util.c	Tue Oct 06 15:56:43 2009 +0000
@@ -180,6 +180,12 @@
 
 	assert_string_equal_free("\x1B[1mbold \x1B[#FF0000mred <font face=\"Comic Sans MS\" size=\"20\">larger \x1B[#000000mbacktoblack <font size=\"12\">normalsize</font>\x1B[#FF0000m</font>\x1B[#000000m\x1B[x1m",
 			yahoo_html_to_codes("<b>bold <font color=\"#FF0000\">red <font face=\"Comic Sans MS\" size=\"5\">larger <font color=\"#000000\">backtoblack <font size=\"3\">normalsize</font></font></font></font></b>"));
+
+	/* buzz/unknown tags */
+	assert_string_equal_free("<ding>",
+			yahoo_html_to_codes("<ding>"));
+	assert_string_equal_free("Unknown <tags>",
+			yahoo_html_to_codes("Unknown <tags>"));
 }
 END_TEST