r103699 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103698‎ | r103699 | r103700 >
Date:18:24, 19 November 2011
Author:hashar
Status:ok
Tags:
Comment:
parserTests: add --filter as an alias of --regex

PHPUnit use the --filter option and I keep incorrectly using it for
parserTest. So this is adding an alias of --regex.
Modified paths:
  • /trunk/phase3/tests/parser/parserTest.inc (modified) (history)
  • /trunk/phase3/tests/parserTests.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/parserTests.php
@@ -24,8 +24,8 @@
2525 * @ingroup Testing
2626 */
2727
28 -$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' );
29 -$optionsWithArgs = array( 'regex', 'seed', 'setversion' );
 28+$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' );
 29+$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' );
3030
3131 require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' );
3232
@@ -41,6 +41,7 @@
4242 --color[=yes|no] Override terminal detection and force color output on or off
4343 use wgCommandLineDarkBg = true; if your term is dark
4444 --regex Only run tests whose descriptions which match given regex
 45+ --filter Alias for --regex
4546 --file=<testfile> Run test cases from a custom file instead of parserTests.txt
4647 --record Record tests in database
4748 --compare Compare with recorded results, without updating the database.
Index: trunk/phase3/tests/parser/parserTest.inc
@@ -105,6 +105,9 @@
106106
107107 $this->showOutput = isset( $options['show-output'] );
108108
 109+ if ( isset( $options['filter'] ) ) {
 110+ $options['regex'] = $options['filter'];
 111+ }
109112
110113 if ( isset( $options['regex'] ) ) {
111114 if ( isset( $options['record'] ) ) {

Status & tagging log