MediaWiki {$wgVersion} parser test suite Usage: php parserTests.php [--quick] [--quiet] [--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 END; 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'])) { $file = $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'; } $ok = $tester->runTestsFromFile($file); exit($ok ? 0 : -1);