Merge "Drop zh-tw message "saveprefs""
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.util.test.js
index d70d1d0..c1f1484 100644 (file)
@@ -83,7 +83,7 @@
                },
                messages: {
                        // Used by accessKeyLabel in test for addPortletLink
-                       'brackets': '[$1]',
+                       brackets: '[$1]',
                        'word-separator': ' '
                }
        } ) );
@@ -92,7 +92,7 @@
                assert.equal( mw.util.rawurlencode( 'Test:A & B/Here' ), 'Test%3AA%20%26%20B%2FHere' );
        } );
 
-       QUnit.test( 'wikiUrlencode', 10, function ( assert ) {
+       QUnit.test( 'wikiUrlencode', 11, function ( assert ) {
                assert.equal( mw.util.wikiUrlencode( 'Test:A & B/Here' ), 'Test:A_%26_B/Here' );
                // See also wfUrlencodeTest.php#provideURLS
                $.each( {
                        '&': '%26',
                        '=': '%3D',
                        ':': ':',
-                       ';@$-_.!*\'': ';@$-_.!*\'',
+                       ';@$-_.!*': ';@$-_.!*',
                        '/': '/',
                        '~': '~',
                        '[]': '%5B%5D',
-                       '<>': '%3C%3E'
+                       '<>': '%3C%3E',
+                       '\'': '%27'
                }, function ( input, output ) {
                        assert.equal( mw.util.wikiUrlencode( input ), output );
                } );
 
        QUnit.test( 'wikiScript', 4, function ( assert ) {
                mw.config.set( {
-                       'wgScript': '/w/i.php', // customized wgScript for bug 39103
-                       'wgLoadScript': '/w/l.php', // customized wgLoadScript for bug 39103
-                       'wgScriptPath': '/w',
-                       'wgScriptExtension': '.php'
+                       wgScript: '/w/i.php', // customized wgScript for bug 39103
+                       wgLoadScript: '/w/l.php', // customized wgLoadScript for bug 39103
+                       wgScriptPath: '/w',
+                       wgScriptExtension: '.php'
                } );
 
                assert.equal( mw.util.wikiScript(), mw.config.get( 'wgScript' ),
                url = 'http://example.org/#&foo=bad';
                assert.strictEqual( mw.util.getParamValue( 'foo', url ), null, 'Ignore hash if param is not in querystring but in hash (bug 27427)' );
 
-               url = 'example.org?' + $.param( { 'TEST': 'a b+c' } );
+               url = 'example.org?' + $.param( { TEST: 'a b+c' } );
                assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c', 'Bug 30441: getParamValue must understand "+" encoding of space' );
 
-               url = 'example.org?' + $.param( { 'TEST': 'a b+c d' } ); // check for sloppy code from r95332 :)
+               url = 'example.org?' + $.param( { TEST: 'a b+c d' } ); // check for sloppy code from r95332 :)
                assert.strictEqual( mw.util.getParamValue( 'TEST', url ), 'a b+c d', 'Bug 30441: getParamValue must understand "+" encoding of space (multiple spaces)' );
        } );