https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114239
Revision: 114239
Author: santhosh
Date: 2012-03-20 08:56:02 +0000 (Tue, 20 Mar 2012)
Log Message:
-----------
Fix the issue with testing de transliteration rules(in general when keypress
transliterate to the same)
Modified Paths:
--------------
trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
Modified: trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
===================================================================
--- trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
2012-03-20 08:39:39 UTC (rev 114238)
+++ trunk/extensions/Narayam/tests/qunit/ext.narayam.rules.tests.js
2012-03-20 08:56:02 UTC (rev 114239)
@@ -32,7 +32,9 @@
var code = charstr.charCodeAt(i);
// Trigger event and undo if prevented
var event = new jQuery.Event( 'keypress', { keyCode: code,
which: code, charCode: code } );
- $input.trigger( event );
+ if( $input.triggerHandler( event ) ) {
+ $input.val( $input.val() + charstr[i] ) ;
+ }
}
};
@@ -130,7 +132,16 @@
scheme: 'mr',
$input: $( '<input>' ).attr( { id: "mr", type: 'text' } )
} );
-
+narayamTest( {
+ description: 'German Transliteration and keybuffer test',
+ tests: [
+ { input: '~o', output: 'ö', description: 'German ö' },
+ { input: '~O', output: 'Ö', description: 'German Ö' },
+ { input: '~s', output: 'ß', description: 'German ß' }
+ ],
+ scheme: 'de',
+ $input: $( '<input>' ).attr( { id: 'de', type: 'text' } )
+} );
teardown( );
}() );
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs