For Programmers: Free Programming Magazines  


Home > Archive > PHP Questions and Answers > September 2006 > cvs: qaweb / write-test.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: qaweb / write-test.php
Nuno Lopes

2006-09-16, 7:57 am

nlopess Sat Sep 16 12:20:14 2006 UTC

Modified files:
/qaweb write-test.php
Log:
fix some html errors. add Uxx sections

http://cvs.php.net/viewvc.cgi/qaweb...1&diff_format=u
Index: qaweb/write-test.php
diff -u qaweb/write-test.php:1.10 qaweb/write-test.php:1.11
--- qaweb/write-test.php:1.10 Thu Sep 14 19:24:49 2006
+++ qaweb/write-test.php Sat Sep 16 12:20:13 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(__FILE__));
-/* $Id: write-test.php,v 1.10 2006/09/14 19:24:49 nlopess Exp $ */
+/* $Id: write-test.php,v 1.11 2006/09/16 12:20:13 nlopess Exp $ */

common_header();
?>
@@ -108,7 +108,7 @@
good idea to generate output with var_dump() calls.</p>

<h3>All Sections</h3>
-A phpt test can have many more parts then just the minimum. In fact some of the manditory parts have
+A phpt test can have many more parts then just the minimum. In fact some of the mandatory parts have
alternatives that may be used if the situation warrents it.
<dl>
<dt>--TEST--</dt>
@@ -139,7 +139,7 @@
<dd>a single line defining the arguments passed to php. (optional)</dd>

<dt>--ENV--</dt>
-<dd>configures the environment to be used for php. (optional)</dt>
+<dd>configures the environment to be used for php. (optional)</dd>

<dt>--FILEEOF--</dt>
<dd>an alternative to --FILE-- where any trainling line break is omitted.
@@ -148,14 +148,22 @@
<dt>--EXPECT--</dt>
<dd>the expected output from the test script. (required)</dd>

+<dt>--UEXPECT--</dt>
+<dd>same as above, but for Unicode mode (PHP &gt;= 6 only, optional)</dd>
+
<dt>--EXPECTF--</dt>
<dd>an alternative of --EXPECT--. The difference is that this form uses
sscanf for output validation. (alternative to --EXPECT--)</dd>

+<dt>--UEXPECTF--</dt>
+<dd>same as above, but for Unicode mode (PHP &gt;= 6 only, optional)</dd>
+
<dt>--EXPECTREGEX--</dt>
<dd>an alternative of --EXPECT--. This form allows the tester to specify the
result in a regular expression. (alternative to --EXPECT--)</dd>
-</dl>
+
+<dt>--UEXPECTREGEX--</dt>
+<dd>same as above, but for Unicode mode (PHP &gt;= 6 only, optional)</dd>

<dt>--REDIRECTTEST--</dt>
<dd>this block allows to redirect from one test to a bunch of other tests.
@@ -178,6 +186,10 @@
<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>
+</dl>
+
+<p><strong>Note:</strong> The Uxx sections (such as UEXPECT) are only needed if
+the output of the test differs in Unicode and non-Unicode mode.</p>

<h2>Examples</h2>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com