Re: how to test using run-tests?

From: Date: Sat, 05 Jan 2008 03:25:00 +0000
Subject: Re: how to test using run-tests?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-34499@lists.php.net to get a copy of this message
Gregory Beaver wrote: > Gregory Beaver wrote: >> Hi, >> >> I'm trying to figure out how to test a feature in the phar extension >> that requires the executable test file to be an actual phar archive. >> This would be possible if there was some way to load the --FILE-- >> section from an external file. Would anyone object to adding a new >> section to the .phpt format "--FILE_EXTERNAL--" that simply takes a >> relative path to the file to use as the contents for the test? >> >> The attached patch adds this section and also fixes a minor bug in the >> handling of POST_RAW that inserts a spurious \n > > Hi again, > > After a bit more thought, I revised things. The attached patch is > better - it simply copies the external file and saves it as the > $test_file. I also failed to mention that this is against PHP_5_3, but > obviously could be ported to HEAD pretty much unmodified OK, so it gets even better. --EXPECTHEADERS-- is broken in run-tests.php as well, it uses CLI sapi. A quick scan of all .phpt tests showed only 1 test actually using --EXPECTHEADERS--. The patch is updated to shunt to cgi sapi if the test contains EXPECTHEADERS because (duh) cli won't output any headers, causing tests using it to fail. Greg

« previous php.internals (#34499) next »