Re: Re: PHPT and --FILEEOF--

From: Date: Thu, 30 Apr 2009 20:44:24 +0000
Subject: Re: Re: PHPT and --FILEEOF--
References: 1 2 3 4  Groups: php.qa 
Request: Send a blank email to php-qa+get-64841@lists.php.net to get a copy of this message
When in doubt, refer to the source of run-tests.php and its commit
history. The big hint here is that FILEEOF replaces \r and \n with '' helly added it to test for bug #35382 (which I found by searching the commit log at cvs.php.net first for FILEEOF and then for 35382): http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.237&r2=1.238 It looks like at the time, the test would pass when it should fail if the comment line ended with \n or with \r or with \r\n. The same is true of the comments2.phpt test - the problem being tested for is the lexer failing when there is nothing after the closing bracket }.
I confirm this historical fact. So this section is really needed and it's used in a few places already. Nuno
Thanks everyone for looking into this. I didn't mean to imply that we should remove the section. I was having trouble nailing down a proper use case for it. I had found the two tests, but neither test alone seem to validate it's use. I should have reviewed the bug report though and that was my mistake. I think I'll document it's use based on the two tests we do have for it, but include comments that it's a rarely used edge-case specific feature. In other words, 99.99% of the time, you wouldn't use this feature.
I've just remember that we actually have some documentation :) check here: http://qa.php.net/phpt_details.php But yes, this feature shouldn't be used most of the times. Nuno

« previous php.qa (#64841) next »