Index: trunk/phase3/tests/qunit/index.html |
— | — | @@ -70,6 +70,8 @@ |
71 | 71 | <script src="../../resources/jquery/jquery.tablesorter.js"></script> |
72 | 72 | <script src="../../resources/jquery/jquery.textSelection.js"></script> |
73 | 73 | <script src="../../resources/mediawiki/mediawiki.Title.js"></script> |
| 74 | + <script src="../../resources/mediawiki.language/mediawiki.language.js"></script> |
| 75 | + <script src="../../resources/mediawiki/mediawiki.jqueryMsg.js"></script> |
74 | 76 | <script src="../../resources/mediawiki.special/mediawiki.special.js"></script> |
75 | 77 | <script src="../../resources/mediawiki.special/mediawiki.special.recentchanges.js"></script> |
76 | 78 | |
— | — | @@ -100,6 +102,7 @@ |
101 | 103 | <script src="suites/resources/jquery/jquery.tablesorter.test.js" charset="UTF-8"></script> |
102 | 104 | <script src="suites/resources/jquery/jquery.textSelection.test.js" charset="UTF-8"></script> |
103 | 105 | <script src="suites/resources/mediawiki/mediawiki.Title.test.js"></script> |
| 106 | + <script src="suites/resources/mediawiki/mediawiki.jqueryMsg.test.js"></script> |
104 | 107 | <script src="suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js"></script> |
105 | 108 | </head> |
106 | 109 | <body> |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js |
— | — | @@ -0,0 +1,17 @@ |
| 2 | +module( 'mediawiki.jqueryMsg' ); |
| 3 | + |
| 4 | +test( '-- Initial check', function() { |
| 5 | + expect( 1 ); |
| 6 | + ok( mw.jqueryMsg, 'mw.jqueryMsg defined' ); |
| 7 | +} ); |
| 8 | + |
| 9 | +test( 'mw.jqueryMsg Plural', function() { |
| 10 | + expect( 5 ); |
| 11 | + var parser = mw.jqueryMsg.getMessageFunction(); |
| 12 | + ok( parser, 'Parser Function initialized' ); |
| 13 | + ok( mw.messages.set( 'plural-msg', 'Found $1 {{PLURAL:$1|item|items}}' ), 'mw.messages.set: Register' ); |
| 14 | + equal( parser('plural-msg', 0 ) , 'Found 0 items', 'Plural test for english with zero as count' ); |
| 15 | + equal( parser('plural-msg', 1 ) , 'Found 1 item', 'Singular test for english' ); |
| 16 | + equal( parser('plural-msg', 2 ) , 'Found 2 items', 'Plural test for english' ); |
| 17 | +} ); |
| 18 | + |
Property changes on: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 19 | + native |