r114253 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114252‎ | r114253 | r114254 >
Date:11:16, 20 March 2012
Author:amire80
Status:ok
Tags:
Comment:
Added tests for Telugu.
Modified paths:
  • /trunk/extensions/Narayam/resources/ext.narayam.rules.te.js (modified) (history)
  • /trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
@@ -48,7 +48,7 @@
4949 tests: [],
5050 scheme: '' // The input method name.
5151 }, options );
52 -
 52+
5353 test( opt.description, function() {
5454 expect( opt.tests.length );
5555 $.narayam.enable();
@@ -57,7 +57,7 @@
5858 opt.$input.appendTo( '#qunit-fixture' );
5959 $.narayam.addInputs( opt.$input );
6060 $.narayam.setScheme( opt.scheme );
61 - for ( var i= 0 ; i < opt.tests.length; i++ ) {
 61+ for ( var i = 0 ; i < opt.tests.length; i++ ) {
6262 // Simulate pressing keys for each of the sample characters
6363 typeChars( opt.$input, opt.tests[i].input );
6464 equals( opt.$input.val(), opt.tests[i].output, opt.tests[i].description );
@@ -93,21 +93,31 @@
9494 } );
9595
9696 narayamTest( {
97 - description: 'Oriya Inscript test',
 97+ description: 'Telugu Transliteration test',
 98+ tests: [
 99+ { input: 'c', output: 'చ్', description: 'Telugu c' },
 100+ { input: 'ch', output: 'చ్', description: 'Telugu ch' }
 101+ ],
 102+ scheme: 'te',
 103+ $input: $( '<input>' ).attr( { id: 'te', type: 'text' } )
 104+} );
 105+
 106+narayamTest( {
 107+ description: 'Oriya InScript test',
98108 tests: [{ input: 'ka', output: 'କୋ' }],
99109 scheme: 'or-inscript',
100110 $input: $( '<input>' ).attr( { id: 'or', type: 'text' } )
101111 } );
102112
103113 narayamTest( {
104 - description: 'Malayalam Inscript test',
 114+ description: 'Malayalam InScript test',
105115 tests: [{ input: 'ka', output: 'കോ' }],
106116 scheme: 'ml-inscript',
107117 $input: $( '<input>' ).attr( { id: 'ml-inscript', type: 'text' } )
108118 } );
109119
110120 narayamTest( {
111 - description: 'Tamil Inscript test',
 121+ description: 'Tamil InScript test',
112122 tests: [
113123 { input: 'ka', output: 'கோ', description: 'Tamil Inscript கோ' }
114124 ],
Index: trunk/extensions/Narayam/resources/ext.narayam.rules.te.js
@@ -8,7 +8,7 @@
99 * License: GPLv3, CC-BY-SA 3.0
1010 */
1111
12 - // Normal rules
 12+// Normal rules
1313 var rules = [
1414 // handle sunna for n and m
1515 ['(మ్|న్)b', '', 'ంబ్'],

Sign-offs

UserFlagDate
Nikerabbitinspected07:55, 21 March 2012

Status & tagging log