changeset 32255:f452f20502a4

A unit test check from the EFF
author Mark Doliner <mark@kingant.net>
date Tue, 16 Aug 2011 06:49:37 +0000
parents 22cb8c11bba8
children be2d3f222f07
files libpurple/tests/test_util.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/tests/test_util.c	Tue Aug 16 04:45:39 2011 +0000
+++ b/libpurple/tests/test_util.c	Tue Aug 16 06:49:37 2011 +0000
@@ -216,6 +216,13 @@
 }
 END_TEST
 
+START_TEST(test_strdup_withhtml)
+{
+	gchar *result = purple_strdup_withhtml("hi\r\nthere\n");
+	assert_string_equal_free("hi<BR>there<BR>", result);
+}
+END_TEST
+
 Suite *
 util_suite(void)
 {
@@ -264,5 +271,9 @@
 	tcase_add_test(tc, test_mime_decode_field);
 	suite_add_tcase(s, tc);
 
+	tc = tcase_create("strdup_withhtml");
+	tcase_add_test(tc, test_strdup_withhtml);
+	suite_add_tcase(s, tc);
+
 	return s;
 }