Add exceptions in mw.Title where mb_strtoupper doesn't match String.toUpperCase
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.Title.test.js
index 910bcc1..124c49f 100644 (file)
                }, 'Throw error on empty string' );
        } );
 
-       QUnit.test( 'Case-sensivity', 3, function ( assert ) {
+       QUnit.test( 'Case-sensivity', 5, function ( assert ) {
                var title;
 
                // Default config
                title = new mw.Title( 'article' );
                assert.equal( title.toString(), 'Article', 'Default config: No sensitive namespaces by default. First-letter becomes uppercase' );
 
+               title = new mw.Title( 'ß' );
+               assert.equal( title.toString(), 'ß', 'Uppercasing matches PHP behaviour (ß -> ß, not SS)' );
+
+               title = new mw.Title( 'dž (digraph)' );
+               assert.equal( title.toString(), 'Dž_(digraph)', 'Uppercasing matches PHP behaviour (dž -> Dž, not DŽ)' );
+
                // $wgCapitalLinks = false;
                mw.config.set( 'wgCaseSensitiveNamespaces', [ 0, -2, 1, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15 ] );