[--help] Options: --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 ENDS; exit(0); } # There is a convention that the parser should never # refer to $wgTitle directly, but instead use the title # passed to it. $wgTitle = Title::newFromText('Parser test script do not use'); $tester = new ParserTest(); if (isset($options['file'])) { $files = array($options['file']); } else { // Default parser tests and any set from extensions or local config $files = $wgParserTestFiles; } # 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);