From: Xavier Claessens Date: Tue, 24 Nov 2009 13:37:32 +0000 (+0100) Subject: Also parse smileys in tests X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=ebaadd93adf03514e9e629b6ae7b065803b046e7 Also parse smileys in tests --- diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c index e1807251..dce91c72 100644 --- a/tests/empathy-parser-test.c +++ b/tests/empathy-parser-test.c @@ -20,6 +20,17 @@ test_replace_link (GString *string, g_string_append_c (string, ']'); } +static void +test_replace_smiley (GString *string, + const gchar *text, + gssize len, + gpointer user_data) +{ + g_string_append_c (string, '<'); + g_string_append_len (string, text, len); + g_string_append_c (string, '>'); +} + static void test_parsers (void) { @@ -27,14 +38,17 @@ test_parsers (void) gchar *tests[] = { "http://foo.com", "[http://foo.com]", + ":)http://foo.com :D", "<:)>[http://foo.com] <:D>", NULL, NULL }; EmpathyStringParser parsers[] = { {empathy_string_match_link, test_replace_link}, + {empathy_string_match_smiley, test_replace_smiley}, {NULL, NULL} }; + DEBUG ("Started"); for (i = 0; tests[i] != NULL; i += 2) { GString *string;