im.pidgin.pidgin: ff5b50d410a4c5d305fbbaacab5465581332c254

nosnilmot at pidgin.im nosnilmot at pidgin.im
Wed Nov 7 21:40:36 EST 2007


-----------------------------------------------------------------
Revision: ff5b50d410a4c5d305fbbaacab5465581332c254
Ancestor: 1f57ebe4e6d16159c74db823ecff2ec0f4c46936
Author: nosnilmot at pidgin.im
Date: 2007-11-08T02:37:02
Branch: im.pidgin.pidgin

Modified files:
        libpurple/tests/test_util.c

ChangeLog: 

Add a test for the html markup parsing to try to prevent a repeat of 2.2.2

-------------- next part --------------
============================================================
--- libpurple/tests/test_util.c	c05c0df6789e2520a3d145080d2eebf76afec7c6
+++ libpurple/tests/test_util.c	ea544aa2e1e78081673ca49960c37b54ff558b08
@@ -81,6 +81,18 @@ END_TEST
 }
 END_TEST
 
+START_TEST(test_markup_html_to_xhtml)
+{
+	gchar *xhtml = NULL;
+	gchar *plaintext = NULL;
+	purple_markup_html_to_xhtml("<a>", &xhtml, &plaintext);
+	fail_unless(strcmp("<a href=''></a>", xhtml) == 0, NULL);
+	g_free(xhtml);
+	fail_unless(strcmp("", plaintext) == 0, NULL);
+	g_free(plaintext);
+}
+END_TEST
+
 Suite *
 util_suite(void)
 {
@@ -113,5 +125,9 @@ util_suite(void)
 	tcase_add_test(tc, test_util_str_to_time);
 	suite_add_tcase(s, tc);
 
+	tc = tcase_create("Markup");
+	tcase_add_test(tc, test_markup_html_to_xhtml);
+	suite_add_tcase(s, tc);
+
 	return s;
 }


More information about the Commits mailing list