From ff4f9d8c7d6d1d5c4a69d75924e4da67a883db44 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 23 Oct 2009 13:50:39 -0700 Subject: Fix an incorrectly passing URL test case and add two a related test case: URLs with paths followed by a double-quote character are incorrectly including the quote in the URL. The double-quote character is in fact not a legal URL char and must be URL-escaped; more importantly it just causes oddities when you quote a message ending in a URL -- such as when using the redent-button experimental feature. --- tests/URLDetectionTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/URLDetectionTest.php b/tests/URLDetectionTest.php index 45203bf6e..0cc03ccce 100644 --- a/tests/URLDetectionTest.php +++ b/tests/URLDetectionTest.php @@ -47,7 +47,9 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase array('127.0.0.1/\'test', '127.0.0.1/\'test'), array('127.0.0.1/"test', - '127.0.0.1/"test'), + '127.0.0.1/"test'), + array('127.0.0.1/test"test', + '127.0.0.1/test"test'), array('127.0.0.1/-test', '127.0.0.1/-test'), array('127.0.0.1/_test', @@ -170,6 +172,8 @@ class URLDetectionTest extends PHPUnit_Framework_TestCase '\'http://example.com\''), array('"http://example.com"', '"http://example.com"'), + array('"http://example.com/"', + '"http://example.com/"'), array('http://example.com', 'http://example.com'), array('(http://example.com)', -- cgit v1.2.3-54-g00ecf