Title: Add unit test to assert ":A" is a valid title value
authorTimo Tijhof <krinklemail@gmail.com>
Mon, 28 Apr 2014 17:50:32 +0000 (19:50 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Mon, 28 Apr 2014 17:50:32 +0000 (19:50 +0200)
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

tests/phpunit/includes/TitleTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js

index 58d5eda..1c7b662 100644 (file)
@@ -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 ),
index f5fd16d..61d662b 100644 (file)
@@ -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 )