summaryrefslogtreecommitdiff
path: root/maintenance/parserTests.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /maintenance/parserTests.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'maintenance/parserTests.php')
-rw-r--r--maintenance/parserTests.php35
1 files changed, 20 insertions, 15 deletions
diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php
index 309bf2e0..bd147788 100644
--- a/maintenance/parserTests.php
+++ b/maintenance/parserTests.php
@@ -26,22 +26,24 @@
require('parserTests.inc');
if( isset( $options['help'] ) ) {
- echo <<<END
+ echo <<<ENDS
MediaWiki $wgVersion parser test suite
-Usage: php parserTests.php [--quick] [--quiet] [--color[=(yes|no|light)]]
+Usage: php parserTests.php [--quick] [--quiet] [--show-output]
+ [--color[=(yes|no|light)]]
[--regex=<expression>] [--file=<testfile>]
[--help]
Options:
- --quick Suppress diff output of failed tests
- --quiet Suppress notification of passed tests (shows only failed tests)
- --color Override terminal detection and force color output on or off
- 'light' option is similar to 'yes' but with color for dark backgrounds
- --regex Only run tests whose descriptions which match given regex
- --file Run test cases from a custom file instead of parserTests.txt
- --help Show this help message
+ --quick Suppress diff output of failed tests
+ --quiet Suppress notification of passed tests (shows only failed tests)
+ --show-output Show expected and actual output
+ --color Override terminal detection and force color output on or off
+ 'light' option is similar to 'yes' but with color for dark backgrounds
+ --regex Only run tests whose descriptions which match given regex
+ --file Run test cases from a custom file instead of parserTests.txt
+ --help Show this help message
-END;
+ENDS;
exit( 0 );
}
@@ -52,13 +54,16 @@ $wgTitle = Title::newFromText( 'Parser test script do not use' );
$tester = new ParserTest();
if( isset( $options['file'] ) ) {
- $file = $options['file'];
+ $files = array( $options['file'] );
} else {
- # Note: the command line setup changes the current working directory
- # to the parent, which is why we have to put the subdir here:
- $file = $IP.'/maintenance/parserTests.txt';
+ // Default parser tests and any set from extensions or local config
+ $files = $wgParserTestFiles;
}
-$ok = $tester->runTestsFromFile( $file );
+
+# Print out software version to assist with locating regressions
+$version = SpecialVersion::getVersion();
+echo( "This is MediaWiki version {$version}.\n" );
+$ok = $tester->runTestsFromFiles( $files );
exit ($ok ? 0 : -1);
?>