Allow comments beginning with '#' between sections, for more detailed
authorWil Mahan <wmahan@users.mediawiki.org>
Wed, 22 Sep 2004 19:46:51 +0000 (19:46 +0000)
committerWil Mahan <wmahan@users.mediawiki.org>
Wed, 22 Sep 2004 19:46:51 +0000 (19:46 +0000)
descriptions of the tests.

maintenance/parserTests.php

index 14f0a04..c17f999 100644 (file)
@@ -25,6 +25,10 @@ class ParserTest {
                $n = 0;
                while( false !== ($line = fgets( $infile ) ) ) {
                        $n++;
+                       if (is_null($section) && preg_match('/^#/', $line)) {
+                               # skip comment
+                               continue;
+                       }
                        if( preg_match( '/^!!\s*(\w+)/', $line, $matches ) ) {
                                $section = strtolower( $matches[1] );
                                if( $section == 'end' ) {
@@ -103,4 +107,4 @@ class ParserTest {
 $tester =& new ParserTest();
 $tester->runTestsFromFile( 'maintenance/parserTests.txt' );
 
-?>
\ No newline at end of file
+?>