aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorVitaly Minko <vitaly.minko@gmail.com>2010-11-01 23:55:00 +0800
committerVitaly Minko <vitaly.minko@gmail.com>2010-11-01 23:55:00 +0800
commit6f6c118815634fa3ddbd62df46e7447341a81f5b (patch)
treec7f7c3dc343aff7c88649678bb295954dc123170 /tests
parent68e5dfaa9c4e5ee49efa13421eb9fc4dfdb04077 (diff)
downloadgsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.gz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.bz2
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.lz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.xz
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.tar.zst
gsoc2013-empathy-6f6c118815634fa3ddbd62df46e7447341a81f5b.zip
String parser is changed in order not to break URLs at apostrophes.
Diffstat (limited to 'tests')
-rw-r--r--tests/empathy-parser-test.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/empathy-parser-test.c b/tests/empathy-parser-test.c
index 5713d967c..a79a7a287 100644
--- a/tests/empathy-parser-test.c
+++ b/tests/empathy-parser-test.c
@@ -44,6 +44,8 @@ test_parsers (void)
"http://foo.com; bar", "[http://foo.com]; bar",
"http://foo.com: bar", "[http://foo.com]: bar",
"http://foo.com:bar", "[http://foo.com:bar]",
+ "http://apos'foo.com", "[http://apos'foo.com]",
+ "mailto:bar'?user@server.com", "[mailto:bar'?user@server.com]",
/* They are not links! */
"http://", "http[:/]/", /* Hm... */
@@ -54,7 +56,7 @@ test_parsers (void)
"mailto:user@.com", "mailto:user@.com",
"user@.com", "user@.com",
- /* Links inside (), {}, [], <> or "" */
+ /* Links inside (), {}, [], <>, "" or '' */
/* FIXME: How to test if the ending ] is matched or not? */
"Foo (www.foo.com)", "Foo ([www.foo.com])",
"Foo {www.foo.com}", "Foo {[www.foo.com]}",
@@ -68,6 +70,8 @@ test_parsers (void)
"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;",
+ "<a href='http://apos'foo.com'>bar</a>", "&lt;a href=&apos;[http://apos'foo.com]&apos;&gt;bar&lt;/a&gt;",
+ "Foo 'bar'?user@server.com'", "Foo &apos;[bar'?user@server.com]&apos;",
/* Basic smileys */
"a:)b", "a[:)]b",