Revision: 45949
Author:   werdna
Date:     2009-01-21 05:48:21 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
Fix a bug, and commit the PHP testing framework.

Modified Paths:
--------------
    branches/change-tagging/extensions/AbuseFilter/AbuseFilter.parser.php
    branches/change-tagging/extensions/AbuseFilter/phpTest.php

Modified: branches/change-tagging/extensions/AbuseFilter/AbuseFilter.parser.php
===================================================================
--- branches/change-tagging/extensions/AbuseFilter/AbuseFilter.parser.php       
2009-01-21 03:50:08 UTC (rev 45948)
+++ branches/change-tagging/extensions/AbuseFilter/AbuseFilter.parser.php       
2009-01-21 05:48:21 UTC (rev 45949)
@@ -558,21 +558,15 @@
                                throw new AFPEexception( "Expected ( at char 
{$this->mCur->value}" );
                        wfProfileIn( __METHOD__."-loadargs" );
                        $args = array();
-                       if( $this->mCur->type != AFPToken::TBrace || 
$this->mCur->value != ')' )
-                               do {
-                                       $this->move();
-                                       $r = new AFPData();
-                                       try {
-                                               $this->doLevelAtom( $r );
-                                       } catch (AFPException $e) {
-                                               $this->move( -1 );
-                                               $this->doLevelSet( $r );
-                                       }
-                                       $args[] = $r;
-                               } while( $this->mCur->type == AFPToken::TComma 
);
+                       do {
+                               $this->move();
+                               $r = new AFPData();
+                               $this->doLevelSet( $r );
+                               $args[] = $r;
+                       } while( $this->mCur->type == AFPToken::TComma );
                        
                        if( $this->mCur->type != AFPToken::TBrace || 
$this->mCur->value != ')' ) {
-                               throw new AFPException( "Expected ) at char 
{$this->mCur->pos}" );
+                               throw new AFPException( "Expected ) at char 
{$this->mCur->pos}, instead I see {$this->mCur->value}, a {$this->mCur->type}" 
);
                        }
                        wfProfileOut( __METHOD__."-loadargs" );
                        

Modified: branches/change-tagging/extensions/AbuseFilter/phpTest.php
===================================================================
--- branches/change-tagging/extensions/AbuseFilter/phpTest.php  2009-01-21 
03:50:08 UTC (rev 45948)
+++ branches/change-tagging/extensions/AbuseFilter/phpTest.php  2009-01-21 
05:48:21 UTC (rev 45949)
@@ -4,10 +4,7 @@
  * Runs tests against the PHP parser.
  */
 
-require_once ( getenv('MW_INSTALL_PATH') !== false
-       ? getenv('MW_INSTALL_PATH')."/maintenance/commandLine.inc"
-       : dirname( __FILE__ ) . '/../../maintenance/commandLine.inc' );
-
+require_once( '/home/andrew/wm-svn/phase3/maintenance/commandLine.inc' );
 $tester = new AbuseFilterParser;
 
 $test_path = dirname( __FILE__ )."/parser_native/tests";
@@ -47,4 +44,4 @@
        }
 }
 
-print "$pass tests passed out of $check\n";
\ No newline at end of file
+print "$pass tests passed out of $check\n";



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to