aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2009-11-24 21:37:32 +0800
committerXavier Claessens <xclaesse@gmail.com>2009-11-25 01:29:45 +0800
commitebaadd93adf03514e9e629b6ae7b065803b046e7 (patch)
tree8fbc6735a048a997dd44a8d94b4ce07becbbe629 /tests
parent3ad67fbdadb2b1da16c53a34fb04489a2acf1def (diff)
downloadgsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar.gz
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar.bz2
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar.lz
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar.xz
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.tar.zst
gsoc2013-empathy-ebaadd93adf03514e9e629b6ae7b065803b046e7.zip
Also parse smileys in tests
Diffstat (limited to 'tests')
-rw-r--r--tests/empathy-parser-test.c14
1 files changed, 14 insertions, 0 deletions
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
@@ -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;