zoe Wed Jul 1 20:16:12 2009 UTC
Modified files:
/phpruntests/src/testcase rtPhpTestFile.php
Log:
Changes to deal with parsing tests that contain section key words inside teh
section
http://cvs.php.net/viewvc.cgi/phpruntests/src/testcase/rtPhpTestFile.php?r1=1.5&r2=1.6&diff_format=u
Index: phpruntests/src/testcase/rtPhpTestFile.php
diff -u phpruntests/src/testcase/rtPhpTestFile.php:1.5
phpruntests/src/testcase/rtPhpTestFile.php:1.6
--- phpruntests/src/testcase/rtPhpTestFile.php:1.5 Tue Jun 30 13:34:56 2009
+++ phpruntests/src/testcase/rtPhpTestFile.php Wed Jul 1 20:16:12 2009
@@ -48,7 +48,7 @@
for ($i=0; $i<count($this->testContents); $i++) {
//This is not nice but there are a huge number of tests with
random spacs at the end of the section header
//and empty sections.
- if (preg_match("/--([A-Z]+(_[A-Z]+|))--/",
$this->testContents[$i], $matches)) {
+ if (preg_match("/^\s*--([A-Z]+(_[A-Z]+|))--/",
$this->testContents[$i], $matches)) {
//look ahead to next section unless this is the last test
section.
//if the EXPECT section is empty (missing) it will be
caught by preconditions.
//If the next line is also a section heading than skip
adding it to the test case or headings.
@@ -63,6 +63,7 @@
}
}
$this->testContents = $tempArray;
+
}
public function arePreConditionsMet()
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php