https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114253

Revision: 114253
Author:   amire80
Date:     2012-03-20 11:16:34 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Added tests for Telugu.

Modified Paths:
--------------
    trunk/extensions/Narayam/resources/ext.narayam.rules.te.js
    trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js

Modified: trunk/extensions/Narayam/resources/ext.narayam.rules.te.js
===================================================================
--- trunk/extensions/Narayam/resources/ext.narayam.rules.te.js  2012-03-20 
11:11:53 UTC (rev 114252)
+++ trunk/extensions/Narayam/resources/ext.narayam.rules.te.js  2012-03-20 
11:16:34 UTC (rev 114253)
@@ -8,7 +8,7 @@
  * License: GPLv3,  CC-BY-SA 3.0
  */
 
- // Normal rules
+// Normal rules
 var rules = [
 // handle sunna for n and m
 ['(మ్|న్)b', '', 'ంబ్'],

Modified: trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
===================================================================
--- trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js     
2012-03-20 11:11:53 UTC (rev 114252)
+++ trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js     
2012-03-20 11:16:34 UTC (rev 114253)
@@ -48,7 +48,7 @@
                tests: [],
                scheme: '' // The input method name.
        }, options );
-       
+
        test( opt.description, function() {
                expect( opt.tests.length );
                $.narayam.enable();
@@ -57,7 +57,7 @@
                        opt.$input.appendTo( '#qunit-fixture' );
                        $.narayam.addInputs( opt.$input );
                        $.narayam.setScheme( opt.scheme  );
-                       for ( var i= 0 ; i < opt.tests.length; i++ ) {
+                       for ( var i = 0 ; i < opt.tests.length; i++ ) {
                                // Simulate pressing keys for each of the 
sample characters
                                typeChars( opt.$input, opt.tests[i].input );
                                equals( opt.$input.val(), opt.tests[i].output, 
opt.tests[i].description );
@@ -93,21 +93,31 @@
 } );
 
 narayamTest( {
-       description: 'Oriya Inscript test',
+       description: 'Telugu Transliteration test',
+       tests: [
+               { input: 'c', output: 'చ్', description: 'Telugu c' },
+               { input: 'ch', output: 'చ్', description: 'Telugu ch' }
+       ],
+       scheme: 'te',
+       $input: $( '<input>' ).attr( { id: 'te', type: 'text' } )
+} );
+
+narayamTest( {
+       description: 'Oriya InScript test',
        tests: [{ input: 'ka', output: 'କୋ' }],
        scheme: 'or-inscript',
        $input: $( '<input>' ).attr( { id: 'or', type: 'text' } )
 } );
 
 narayamTest( {
-       description: 'Malayalam Inscript test',
+       description: 'Malayalam InScript test',
        tests: [{ input: 'ka', output: 'കോ' }],
        scheme: 'ml-inscript',
        $input: $( '<input>' ).attr( { id: 'ml-inscript', type: 'text' } )
 } );
 
 narayamTest( {
-       description: 'Tamil Inscript test',
+       description: 'Tamil InScript test',
        tests: [
                { input: 'ka', output: 'கோ', description: 'Tamil Inscript கோ' }
        ],


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to