aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-08 22:46:05 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-06-08 23:33:56 +0800
commit8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f (patch)
tree937083c21e69bb082414827227e464a76dee455c
parentce6520bd5432a14f9d2689aae388747a9303c014 (diff)
downloadgsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar.gz
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar.bz2
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar.lz
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar.xz
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.tar.zst
gsoc2013-empathy-8b8e9567d5a5d44bbb565013e1b7856f21ab1c5f.zip
empathy-parser-test: use empathy_string_replace_escaped
-rw-r--r--tests/empathy-parser-test.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c
index e767852fd..8e4c15a66 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 &lt;[www.foo.com]&gt;",
+ "Foo \"www.foo.com\"", "Foo &quot;[www.foo.com]&quot;",
"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>", "&lt;a href=&quot;[http://foo.com]&quot;&gt;bar&lt;/a&gt;",
"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 &lt;[user@server.com]&gt;",
+ "Foo \"user@server.com\"", "Foo &quot;[user@server.com]&quot;",
/* Basic smileys */
"a:)b", "a[:)]b",
">:)", "[>:)]",
- ">:(", ">[:(]",
+ ">:(", "&gt;[:(]",
/* 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;