From: Timo Tijhof Date: Mon, 28 Apr 2014 17:50:32 +0000 (+0200) Subject: Title: Add unit test to assert ":A" is a valid title value X-Git-Tag: 1.31.0-rc.0~15990^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=c8c405655121ef338cf519c55639b13b17e2504d;p=lhc%2Fweb%2Fwiklou.git Title: Add unit test to assert ":A" is a valid title value Mostly to catch regressions. While this is an invalid title, it is valid as syntax when creating a Title *object*, the actual page title itself does not allow leading colons. Change-Id: Idbe8a3bfe487926c5fc8bdcfa69a957fc9d0bc49 --- diff --git a/tests/phpunit/includes/TitleTest.php b/tests/phpunit/includes/TitleTest.php index 58d5edab02..1c7b6623cd 100644 --- a/tests/phpunit/includes/TitleTest.php +++ b/tests/phpunit/includes/TitleTest.php @@ -81,6 +81,7 @@ class TitleTest extends MediaWikiTestCase { 'Foo/.../Sandbox', 'Sandbox/...', 'A~~', + ':A', // Length is 256 total, but only title part matters 'Category:' . str_repeat( 'x', 248 ), str_repeat( 'x', 252 ), diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js index f5fd16dbe2..61d662b4ed 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js @@ -74,6 +74,7 @@ 'Foo/.../Sandbox', 'Sandbox/...', 'A~~', + ':A', // Length is 256 total, but only title part matters 'Category:' + repeat( 'x', 248 ), repeat( 'x', 252 )