Merge "TableSorter: Avoid Sizzle selectors"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / jquery / jquery.tablesorter.test.js
index fc0eecc..2711ddf 100644 (file)
                        [ 'Günther' ],
                        [ 'Peter' ],
                        [ 'Björn' ],
+                       [ 'ä' ],
+                       [ 'z' ],
                        [ 'Bjorn' ],
+                       [ 'BjÖrn' ],
+                       [ 'apfel' ],
                        [ 'Apfel' ],
                        [ 'Äpfel' ],
                        [ 'Strasse' ],
                        [ 'Sträßschen' ]
                ],
-               umlautWordsSorted = [
+               umlautWordsSortedEn = [
+                       [ 'ä' ],
                        [ 'Äpfel' ],
+                       [ 'apfel' ],
                        [ 'Apfel' ],
                        [ 'Björn' ],
+                       [ 'BjÖrn' ],
                        [ 'Bjorn' ],
                        [ 'Günther' ],
                        [ 'Peter' ],
                        [ 'Sträßschen' ],
-                       [ 'Strasse' ]
+                       [ 'Strasse' ],
+                       [ 'z' ]
+               ],
+               umlautWordsSortedSv = [
+                       [ 'apfel' ],
+                       [ 'Apfel' ],
+                       [ 'Bjorn' ],
+                       [ 'Björn' ],
+                       [ 'BjÖrn' ],
+                       [ 'Günther' ],
+                       [ 'Peter' ],
+                       [ 'Strasse' ],
+                       [ 'Sträßschen' ],
+                       [ 'z' ],
+                       [ 'ä' ], // ä sorts after z in Swedish
+                       [ 'Äpfel' ]
                ],
 
                // Data set "digraph"
                'Accented Characters with custom collation',
                [ 'Name' ],
                umlautWords,
-               umlautWordsSorted,
+               umlautWordsSortedEn,
                function ( $table ) {
                        mw.config.set( 'tableSorterCollation', {
                                ä: 'ae',
                }
        );
 
+       tableTest(
+               'Accented Characters Swedish locale',
+               [ 'Name' ],
+               umlautWords,
+               umlautWordsSortedSv,
+               function ( $table ) {
+                       mw.config.set( 'wgPageContentLanguage', 'sv' );
+
+                       $table.tablesorter();
+                       $table.find( '.headerSort:eq(0)' ).trigger( 'click' );
+               }
+       );
+
        tableTest(
                'Digraphs with custom collation',
                [ 'City' ],