| Marcus Boerger 2006-07-12, 9:57 pm |
| helly Tue Jul 11 22:50:53 2006 UTC
Modified files:
/qaweb write-test.php
Log:
- Update
http://cvs.php.net/viewvc.cgi/qaweb...7&diff_format=u
Index: qaweb/write-test.php
diff -u qaweb/write-test.php:1.6 qaweb/write-test.php:1.7
--- qaweb/write-test.php:1.6 Sun Jul 9 12:45:53 2006
+++ qaweb/write-test.php Tue Jul 11 22:50:53 2006
@@ -3,7 +3,7 @@
$TITLE = "Writing Tests [PHP-QAT: Quality Assurance Team]";
$SITE_UPDATE = date("D M d H:i:s Y T", filectime($SCRIPT_FILENAME));
-/* $Id: write-test.php,v 1.6 2006/07/09 12:45:53 helly Exp $ */
+/* $Id: write-test.php,v 1.7 2006/07/11 22:50:53 helly Exp $ */
common_header();
?>
@@ -97,6 +97,10 @@
--no-clean you can prevent its execution to inspect generated data/files that
were normally removed after the test. (optional)</dd>
+<dt>===DONE===</dt>
+<dd>This is only available in the --FILE-- section. Any part after this line
+is not going into the actual test script (see below for more).</dd>
+
<p>A test must at least contain the sections TEST, FILE and either EXPECT
or EXPECTF. When a test is called run-test.php takes the name from the
TEST section and writes the FILE section into a ".php" file with the
@@ -241,11 +245,14 @@
that is a system dependent character '/' or ''.</p>
<p>Often you want to run test scripts without run-tests.php by
-simply executing them on commandline like any other php script. Sometimes then
-it disturbs having a long --EXPECT-- block. The workaround is to use terminate
-the --FILE-- section with the two lines "===DONE===" and "<?php echo "<\?php exit(0); ?\>"; ?>".
+simply executing them on commandline like any other php script. But sometimes
+it disturbs having a long --EXPECT-- block, so that you don't see the actual
+output as it scrolls away overwritten by the blocks following the actual file
+block. The workaround is to use terminate the --FILE-- section with the two
+lines "===DONE===" and "<?php echo "<\?php exit(0); ?\>"; ?>".
When doing so run-tests.php does not execute the line containing the exit call
-as that would suppress leak messages.</p>
+as that would suppress leak messages. Actually run-tests.php ignores any part
+after a line consisting only of "===DONE===".</p>
<p></p>
</td>
<td width="10"> </td>
|