From 9a76749cc3326044b309dd3bd7539d5d3bfff482 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 19 Nov 2011 18:24:43 +0000 Subject: [PATCH] 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. --- tests/parser/parserTest.inc | 3 +++ tests/parserTests.php | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc index b9fd221217..bce481becc 100644 --- a/tests/parser/parserTest.inc +++ b/tests/parser/parserTest.inc @@ -105,6 +105,9 @@ class ParserTest { $this->showOutput = isset( $options['show-output'] ); + if ( isset( $options['filter'] ) ) { + $options['regex'] = $options['filter']; + } if ( isset( $options['regex'] ) ) { if ( isset( $options['record'] ) ) { diff --git a/tests/parserTests.php b/tests/parserTests.php index 854f077d8e..d930ac5a68 100644 --- a/tests/parserTests.php +++ b/tests/parserTests.php @@ -24,8 +24,8 @@ * @ingroup Testing */ -$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' ); -$optionsWithArgs = array( 'regex', 'seed', 'setversion' ); +$otions = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record', 'run-disabled' ); +$optionsWithArgs = array( 'regex', 'filter', 'seed', 'setversion' ); require_once( dirname( __FILE__ ) . '/../maintenance/commandLine.inc' ); @@ -41,6 +41,7 @@ Options: --color[=yes|no] Override terminal detection and force color output on or off use wgCommandLineDarkBg = true; if your term is dark --regex Only run tests whose descriptions which match given regex + --filter Alias for --regex --file= Run test cases from a custom file instead of parserTests.txt --record Record tests in database --compare Compare with recorded results, without updating the database. -- 2.20.1