From 6f6c118815634fa3ddbd62df46e7447341a81f5b Mon Sep 17 00:00:00 2001 From: Vitaly Minko Date: Mon, 1 Nov 2010 18:55:00 +0300 Subject: String parser is changed in order not to break URLs at apostrophes. --- tests/empathy-parser-test.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') 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 ", "Foo <[user@server.com]>", "Foo \"user@server.com\"", "Foo "[user@server.com]"", + "bar", "<a href='[http://apos'foo.com]'>bar</a>", + "Foo 'bar'?user@server.com'", "Foo '[bar'?user@server.com]'", /* Basic smileys */ "a:)b", "a[:)]b", -- cgit v1.2.3