[empathy] empathy-parser-test: use empathy_string_replace_escaped
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy-parser-test: use empathy_string_replace_escaped
- Date: Tue, 8 Jun 2010 15:48:02 +0000 (UTC)
commit 8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Jun 8 16:46:05 2010 +0200
empathy-parser-test: use empathy_string_replace_escaped
tests/empathy-parser-test.c | 25 +++++++------------------
1 files changed, 7 insertions(+), 18 deletions(-)
---
diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c
index e767852..8e4c15a 100644
--- a/tests/empathy-parser-test.c
+++ b/tests/empathy-parser-test.c
@@ -25,17 +25,6 @@ test_replace_match (const gchar *text,
}
static void
-test_replace_verbatim (const gchar *text,
- gssize len,
- gpointer match_data,
- gpointer user_data)
-{
- GString *string = user_data;
-
- g_string_append_len (string, text, len);
-}
-
-static void
test_parsers (void)
{
gchar *tests[] =
@@ -70,20 +59,20 @@ test_parsers (void)
"Foo (www.foo.com)", "Foo ([www.foo.com])",
"Foo {www.foo.com}", "Foo {[www.foo.com]}",
"Foo [www.foo.com]", "Foo [[www.foo.com]]",
- "Foo <www.foo.com>", "Foo <[www.foo.com]>",
- "Foo \"www.foo.com\"", "Foo \"[www.foo.com]\"",
+ "Foo <www.foo.com>", "Foo <[www.foo.com]>",
+ "Foo \"www.foo.com\"", "Foo "[www.foo.com]"",
"Foo (www.foo.com/bar(123)baz)", "Foo ([www.foo.com/bar(123)baz])",
- "<a href=\"http://foo.com\">bar</a>", "<a href=\"[http://foo.com]\">bar</a>",
+ "<a href=\"http://foo.com\">bar</a>", "<a href="[http://foo.com]">bar</a>",
"Foo (user server com)", "Foo ([user server com])",
"Foo {user server com}", "Foo {[user server com]}",
"Foo [user server com]", "Foo [[user server com]]",
- "Foo <user server com>", "Foo <[user server com]>",
- "Foo \"user server com\"", "Foo \"[user server com]\"",
+ "Foo <user server com>", "Foo <[user server com]>",
+ "Foo \"user server com\"", "Foo "[user server com]"",
/* Basic smileys */
"a:)b", "a[:)]b",
">:)", "[>:)]",
- ">:(", ">[:(]",
+ ">:(", ">[:(]",
/* Smileys and links mixed */
":)http://foo.com", "[:)][http://foo.com]",
@@ -102,7 +91,7 @@ test_parsers (void)
{
{empathy_string_match_link, test_replace_match},
{empathy_string_match_smiley, test_replace_match},
- {empathy_string_match_all, test_replace_verbatim},
+ {empathy_string_match_all, empathy_string_replace_escaped},
{NULL, NULL}
};
guint i;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]