From ebaadd93adf03514e9e629b6ae7b065803b046e7 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 24 Nov 2009 14:37:32 +0100 Subject: Also parse smileys in tests --- tests/empathy-parser-test.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/empathy-parser-test.c') diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c index e1807251d..dce91c722 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; -- cgit v1.2.3