Merge "Add a test for autonym sorting"

This commit is contained in:
Nikerabbit
2012-08-09 08:10:59 +00:00
committed by Gerrit Code Review

View File

@@ -43,7 +43,7 @@ test( "-- Initial check", function() {
} ); } );
test( "-- $.uls.data testing", function() { test( "-- $.uls.data testing", function() {
expect( 18 ); expect( 19 );
// This test assumes that we don't want any scripts to be in the 'Other' // This test assumes that we don't want any scripts to be in the 'Other'
// group. Actually, this may become wrong some day. // group. Actually, this may become wrong some day.
@@ -99,6 +99,9 @@ test( "-- $.uls.data testing", function() {
deepEqual( allLanguagesByScriptGroup['Greek'], ['el', 'grc', 'pnt', 'ruq-grek', 'tsd'], 'All languages in the Greek script found' ); deepEqual( allLanguagesByScriptGroup['Greek'], ['el', 'grc', 'pnt', 'ruq-grek', 'tsd'], 'All languages in the Greek script found' );
deepEqual( $.uls.data.allRegions(), ['NA', 'LA', 'SA', 'EU', 'ME', 'AF', 'AS', 'PA', 'AU', 'WW'], 'All regions found' ); deepEqual( $.uls.data.allRegions(), ['NA', 'LA', 'SA', 'EU', 'ME', 'AF', 'AS', 'PA', 'AU', 'WW'], 'All regions found' );
// autonyms: gn: avañe'ẽ, de: deutsch, hu: magyar, fi: suomi
deepEqual( ['de', 'fi', 'gn', 'hu'].sort( $.uls.data.sortByAutonym ), ['gn', 'de', 'hu', 'fi'], 'Languages are correctly sorted by autonym' );
} ); } );
}() ); }() );