Re: Re: PHPT and --FILEEOF--
| From: | Eric Stewart | Date: | Thu, 30 Apr 2009 20:30:38 +0000 |
| Subject: | Re: Re: PHPT and --FILEEOF-- | ||
| References: | 1 2 3 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64839@lists.php.net to get a copy of this message | ||
On Thu, Apr 30, 2009 at 1:08 PM, Nuno Lopes <nlopess@php.net> wrote:
> 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.
Eric Lee Stewart
ericleestewart@gmail.com