r104847 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104846‎ | r104847 | r104848 >
Date:12:30, 1 December 2011
Author:hashar
Status:deferred
Tags:
Comment:
option to disable color output (use --no-color )
Modified paths:
  • /trunk/extensions/VisualEditor/tests/parser/parserTests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/parser/parserTests.js
@@ -34,6 +34,11 @@
3535 boolean: true,
3636 default: false,
3737 },
 38+ 'color': {
 39+ description: 'Enable color output Ex: --no-color',
 40+ boolean: true,
 41+ default: true,
 42+ },
3843 'filter': {
3944 description: 'Only run tests whose descriptions which match given regex',
4045 alias: 'regex',
@@ -48,7 +53,7 @@
4954 alias: 'h',
5055 },
5156 'disabled': {
52 - description: 'Run disabled tests (default false) (option not implemented)',
 57+ description: 'Run disabled tests (option not implemented)',
5358 default: false,
5459 boolean: true,
5560 },
@@ -66,6 +71,7 @@
6772 ).argv // keep that
6873 ;
6974
 75+
7076 if( argv.help ) {
7177 optimist.showHelp();
7278 process.exit( 0 );
@@ -75,6 +81,9 @@
7682 test_filter = new RegExp( argv.filter );
7783 console.log( "Filtering title test using Regexp " + test_filter );
7884 }
 85+if( !argv.color ) {
 86+ colors.mode = 'none';
 87+}
7988
8089 // @fixme wrap more or this setup in a common module
8190

Status & tagging log