Index: trunk/extensions/VisualEditor/tests/parser/parserTests.js |
— | — | @@ -38,6 +38,11 @@ |
39 | 39 | description: 'Only run tests whose descriptions which match given regex', |
40 | 40 | alias: 'regex', |
41 | 41 | }, |
| 42 | + 'whitelist': { |
| 43 | + description: 'Alternatively compare against manually verified parser output from whitelist (default true)', |
| 44 | + default: true, |
| 45 | + boolean: true, |
| 46 | + }, |
42 | 47 | 'help': { |
43 | 48 | description: 'Show this help message', |
44 | 49 | alias: 'h', |
— | — | @@ -304,8 +309,9 @@ |
305 | 310 | var normalizedOut = normalizeOut(out); |
306 | 311 | var normalizedExpected = normalizeHTML(item.result); |
307 | 312 | 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) { |
310 | 316 | if( !argv.quiet ) { |
311 | 317 | console.log( 'PASSED (whiteList)'.green + ': ' + item.title.yellow ); |
312 | 318 | } |