r104844 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104843‎ | r104844 | r104845 >
Date:11:08, 1 December 2011
Author:gwicke
Status:deferred
Tags:
Comment:
Add option to disable whitelist
Modified paths:
  • /trunk/extensions/VisualEditor/tests/parser/parserTests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/parser/parserTests.js
@@ -38,6 +38,11 @@
3939 description: 'Only run tests whose descriptions which match given regex',
4040 alias: 'regex',
4141 },
 42+ 'whitelist': {
 43+ description: 'Alternatively compare against manually verified parser output from whitelist (default true)',
 44+ default: true,
 45+ boolean: true,
 46+ },
4247 'help': {
4348 description: 'Show this help message',
4449 alias: 'h',
@@ -304,8 +309,9 @@
305310 var normalizedOut = normalizeOut(out);
306311 var normalizedExpected = normalizeHTML(item.result);
307312 if ( normalizedOut !== normalizedExpected ) {
308 - if (item.title in testWhiteList &&
309 - normalizeOut(testWhiteList[item.title]) === normalizedOut) {
 313+ if (args.whiteList &&
 314+ item.title in testWhiteList &&
 315+ normalizeOut(testWhiteList[item.title]) === normalizedOut) {
310316 if( !argv.quiet ) {
311317 console.log( 'PASSED (whiteList)'.green + ': ' + item.title.yellow );
312318 }

Status & tagging log