cvs: qaweb / write-test.php

From: Date: Sat, 16 Sep 2006 12:20:14 +0000
Subject: cvs: qaweb / write-test.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-26903@lists.php.net to get a copy of this message
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/write-test.php?r1=1.10&r2=1.11&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>

« previous php.qa (#26903) next »