From: Wil Mahan Date: Wed, 22 Sep 2004 19:46:51 +0000 (+0000) Subject: Allow comments beginning with '#' between sections, for more detailed X-Git-Tag: 1.5.0alpha1~1878 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=0d35bb7770a2613eb29e67456ff96344c9886802;p=lhc%2Fweb%2Fwiklou.git Allow comments beginning with '#' between sections, for more detailed descriptions of the tests. --- diff --git a/maintenance/parserTests.php b/maintenance/parserTests.php index 14f0a04a4f..c17f9995b3 100644 --- a/maintenance/parserTests.php +++ b/maintenance/parserTests.php @@ -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 +?>