Reading a parser test file with no tests matching the regex was counted as a FAIL.
authorPlatonides <platonides@users.mediawiki.org>
Tue, 4 May 2010 16:39:04 +0000 (16:39 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 4 May 2010 16:39:04 +0000 (16:39 +0000)
maintenance/parserTests.inc

index 69d03a8..0a3522f 100644 (file)
@@ -289,7 +289,7 @@ class ParserTest {
 
        function runTests($tests) {
                $ok = true;
-  foreach($tests as $i => $t) {
+               foreach($tests as $i => $t) {
                        $result =
                                $this->runTest($t['test'], $t['input'], $t['result'], $t['options'], $t['config']);
                        $ok = $ok && $result;
@@ -1592,10 +1592,10 @@ class TestFileIterator implements Iterator {
                if(fseek($this->fh, 0)) {
                        wfDie( "Couldn't fseek to the start of '$filename'\n" );
                }
-               $this->index = 0;
+               $this->index = -1;
                $this->lineNum = 0;
                $this->eof = false;
-               $this->readNextTest();
+               $this->next();
 
                return true;
     }