Re: PHPT and --FILEEOF--

From: Date: Thu, 30 Apr 2009 07:51:11 +0000
Subject: Re: PHPT and --FILEEOF--
References: 1  Groups: php.qa 
Request: Send a blank email to php-qa+get-64830@lists.php.net to get a copy of this message
Eric Stewart wrote:
I've been doing some research for a new document which details all sections of the PHPT file layout. It includes a description, any requirements, whether it's a required section, format and diverse examples for each and every section. When I ran into --FILEEOF--, I hit a wall. None of the descriptions I've found point to any real world usages. I then search all the PHPTs and only found 2 instances of it's usage in current use: /tests/lang/bug35382.phpt /tests/lang/comments2.phpt The reason for using --FILEEOF-- in either of these tests wasn't apparent to me. So I ran both tests and they both passed. But then I modified them swapping out the --FILEEOF-- for --FILE-- and reran the tests. Both passed again. This unfortunately leads me to believe that even these two tests don't present any real world reason for this construct. So I'm a little unsure what the use case for --FILEEOF-- is. Can anyone help me out? lol - I'm so glad you raised this :-) I too read the docs because I'm working through re-implementing sections in the new code.
I haven't done as much research as you have, but my initial observations were exactly the same. If no-one can find a good reason for this section I suggest we fix up the two tests and I'll get rid of the documentation. If there is a good reason I will document it with an example so we don't have to go round this loop again. By the way - if you want simple sample tests look in check out the new run-tests code and look in phpt-samples. ( cvs -d :pserver:cvsread@cvs.php.net:/repository checkout phpruntests). Do not use the gzip_post or deflate_post ones because I'm changing the implementation, I can send you samples of those though. Do you have update access to the QA pages by the way? Zoe
Eric Stewart ericleestewart@gmail.com


« previous php.qa (#64830) next »