Re: PHPT ===DONE===

From: Date: Tue, 24 Apr 2007 02:13:55 +0000
Subject: Re: PHPT ===DONE===
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-27130@lists.php.net to get a copy of this message
Carsten Wiedmann wrote: > Gregory Beaver schrieb: > >> PEAR_RunTest does not support ===DONE=== this is a relatively recent >> addition. There is no reason it isn't supported, feel free to open a >> feature request w/patch and it'll be in 1.6.0 > > Ah, now I understand. phpt from PEAR is not exactly the same as from > PHP-QAT. This site [1] was the only one I have found about phpt. > > Are there any infos on the PEAR website about phpt? For example > RunTest.php knows the sections "FAIL" and "RETURNS", which aren't > described on [1]. > > BTW: Patch is on the way. FAIL and RETURNS are two features I implemented in order to test specific features of the PEAR installer, but you're right, it would make sense to document them. I planned to try them out for a little while and make sure they weren't stupid, but it has officially been a while now. --RETURNS-- is used to test the return value for scripts that are used in shell scripts. In the case of the pear installer, the shell-test command (pear help shell-test for details) can be used in shell scripts for conditional branching. In order to unit test this feature, I needed to be able to verify that it was returning 0 or 1 in the correct situations. Sample tests are in cvs at pear-core/tests/PEAR_Command_Registry/shell-test/. --FAIL-- is used to test the run-tests command itself, and was implemented specifically to test a bugfix for EXPECTF sections. When an EXPECTF test was failing, it was including matching lines in the diff because they were different according to == comparison. In order to verify that the patch fixed this bug, I implemented --FAIL-- to allow a simple == comparison between the generated .diff file and the expected .diff file. I am pretty certain --FAIL-- will have no utility for any other possible usage :). Other sections not yet supported are the U varieties (UEXPECT/UEXPECTF) as these are for PHP 6, and PEAR will not work in PHP 6. Hope this helps, Greg

« previous php.pear.general (#27130) next »