zoe             Wed Jul  1 20:16:12 2009 UTC

  Modified files:              
    /phpruntests/src/testcase   rtPhpTestFile.php 
  Changes to deal with parsing tests that contain section key words  inside teh 
Index: phpruntests/src/testcase/rtPhpTestFile.php
diff -u phpruntests/src/testcase/rtPhpTestFile.php:1.5 
--- 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 
                     //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

Reply via email to