[empathy] Also parse smileys in tests



commit ebaadd93adf03514e9e629b6ae7b065803b046e7
Author: Xavier Claessens <xclaesse gmail com>
Date:   Tue Nov 24 14:37:32 2009 +0100

    Also parse smileys in tests

 tests/empathy-parser-test.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c
index e180725..dce91c7 100644
--- a/tests/empathy-parser-test.c
+++ b/tests/empathy-parser-test.c
@@ -21,20 +21,34 @@ test_replace_link (GString *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)
 {
   guint i;
   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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]