--- On Fri, 7/10/09, Aryeh Gregor <[email protected]> wrote:

> From: Aryeh Gregor <[email protected]>
> Subject: Re: [Wikitech-l] How do you run the parserTests?
> To: "Wikimedia developers" <[email protected]>
> Date: Friday, July 10, 2009, 1:51 PM
> On Fri, Jul 10, 2009 at 3:59 PM, dan
> nessett<[email protected]>
> wrote:
> >
> > I have been struggling to figure out how to run the
> parser tests. From the very limited documentation in the
> code, it appears you are supposed to run them from a
> terminal. However, when I cd to the maintenance directory
> and type "php parserTests.php" I get the following error
> message.
> >
> > Parse error: parse error, expecting `T_OLD_FUNCTION'
> or `T_FUNCTION' or `T_VAR' or `'}'' in
> /Users/dnessett/Sites/Mediawiki/maintenance/parserTests.inc
> on line 43
> >
> > Either there is some setup necessary that I haven't
> done; parserTests.php is not the appropriate "top-level"
> target for the execution; you are not supposed to run these
> tests from the terminal; or there is something else I am
> doing wrong.
> 
> You're running them correctly.  It sounds like your
> installation is
> broken.  Please say exactly what version of MediaWiki
> you're using
> (from Special:Version), and make sure that parserTests.inc
> was
> correctly copied from the download.  Paste line 43 and
> the surrounding
> lines here.

MediaWiki       1.14.0
PHP     5.2.6 (apache2handler)
MySQL   5.0.41

I am running this on my Macintosh using MAMP 
(http://www.mamp.info/en/index.html). parserTests.inc looks OK to me (but I 
don't know what to look for). Lines 28-48 are:

=====

$options = array( 'quick', 'color', 'quiet', 'help', 'show-output', 'record' );
$optionsWithArgs = array( 'regex', 'seed' );

require_once( 'commandLine.inc' );
require_once( "$IP/maintenance/parserTestsParserHook.php" );
require_once( "$IP/maintenance/parserTestsStaticParserHook.php" );
require_once( "$IP/maintenance/parserTestsParserTime.php" );

/**
 * @ingroup Maintenance
 */
class ParserTest {
        /**
         * boolean $color whereas output should be colorized
         */
        private $color;

        /**
         * boolean $showOutput Show test output
         */
        private $showOutput;

=====

Dan


      

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to