From 0d35bb7770a2613eb29e67456ff96344c9886802 Mon Sep 17 00:00:00 2001 From: Wil Mahan Date: Wed, 22 Sep 2004 19:46:51 +0000 Subject: [PATCH] Allow comments beginning with '#' between sections, for more detailed descriptions of the tests. --- maintenance/parserTests.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +?> -- 2.20.1