cvs: qaweb / write-test.php

From: Date: Sun, 09 Jul 2006 11:17:25 +0000
Subject: cvs: qaweb / write-test.php
Groups: php.qa 
Request: Send a blank email to php-qa+get-26822@lists.php.net to get a copy of this message
helly Sun Jul 9 11:17:25 2006 UTC Modified files: /qaweb write-test.php Log: - Update http://cvs.php.net/viewvc.cgi/qaweb/write-test.php?r1=1.3&r2=1.4&diff_format=u Index: qaweb/write-test.php diff -u qaweb/write-test.php:1.3 qaweb/write-test.php:1.4 --- qaweb/write-test.php:1.3 Sat May 13 14:10:48 2006 +++ qaweb/write-test.php Sun Jul 9 11:17:25 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.3 2006/05/13 14:10:48 helly Exp $ */ +/* $Id: write-test.php,v 1.4 2006/07/09 11:17:25 helly Exp $ */ common_header(); ?> @@ -234,7 +234,18 @@ $php_errormsg variable, which you can then output. This will result in a consistent error message output across all platforms and PHP configurations, preventing your test from failing due inconsistencies in the error message -content.</p> +content. Alternatively you can use --EXPECTF-- and check for the message by +replacing the path of the source of the message with "%s" and the line number +with "%d". The end of a message in a test file "example.phpt" then looks like +"in %sexample.php on line %d". We explicitly dropped the last path devider as +that is a system dependent character '/' or '\'.</p> + +<p><b>NOTE:</b> 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); ?\>"; ?>". +When doing so run-tests.php does not execute the line containing the exit call +as that would suppress leak messages. <p></p> </td> <td width="10">&nbsp;</td>

« previous php.qa (#26822) next »