2 QUnit
.module( 'mediawiki.RegExp' );
4 QUnit
.test( 'escape', function ( assert
) {
26 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
27 'abcdefghijklmnopqrstuvwxyz',
31 specials
.forEach( function ( str
) {
32 assert
.propEqual( str
.match( new RegExp( mw
.RegExp
.escape( str
) ) ), [ str
], 'Match ' + str
);
35 assert
.strictEqual( mw
.RegExp
.escape( normal
), normal
, 'Alphanumerals are left alone' );