# HG changeset patch # User Mark Doliner # Date 1313477377 0 # Node ID f452f20502a418e2f57167808277833e0689d33d # Parent 22cb8c11bba8806d2961ada1533c04b1dbd71a83 A unit test check from the EFF diff -r 22cb8c11bba8 -r f452f20502a4 libpurple/tests/test_util.c --- 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
there
", 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; }