Re: Can we use PHPT instead of .php and .php.expect
| From: | Sara Golemon | Date: | Sat, 04 Oct 2014 00:56:23 +0000 |
| Subject: | Re: Can we use PHPT instead of .php and .php.expect | ||
| References: | 1 2 | Groups: | php.standards |
| Request: | Send a blank email to standards-+get-477@lists.php.net to get a copy of this message | ||
On Sat, Oct 4, 2014 at 12:37 AM, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
>> Why are the spec tests so basic, using just .php and .php.expect
>> files? Is there a good reason not to use the more sophisticated,
>> though still lightweight and simple, PHPT test format used by php.net
>> PHP? This way, we could write tests that work for both (or even share
>> tests), and you would be able to use EXPECTFs (which are
>> super-handy).
>
> Using phpt would be nice. I wonder if we could write a script that
> converts php+expect pairs into phpt.
>
Short version: 'Cause that's how they got made.
The first versions of those tests were written by the original spec
author who was really just writing scripts to confirm what he expected
from the documentation and the sources. The expect files were added
by someone later in the chain (using ZE2 as the definition of truth).
I certainly agree that phpt is a nicer format, so you won't get any
complaints from me.
-Sara