Commits

Anonymous committed be6681e

Fix a bug, and commit the PHP testing framework.

  • Participants
  • Parent commits cc4e06e
  • Branches change-tagging

Comments (0)

Files changed (2)

File extensions/AbuseFilter/AbuseFilter.parser.php

 				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" );
 			

File extensions/AbuseFilter/phpTest.php

  * 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";
 	}
 }
 
-print "$pass tests passed out of $check\n";
+print "$pass tests passed out of $check\n";