Re: [STANDARDS] Can we use PHPT instead of .php and .php.expect

[email protected] (Andrea Faulds)
Newsgroups php.standards
Message-ID <[email protected]>
On 4 Oct 2014, at 00:37, Stas Malyshev <[email protected]> wrote:

> Hi!
> 
>> 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.

Done: https://gist.github.com/TazeTSchnitzel/a15bc06a8f170cbb0a37

Run this in php-langspec and it’ll convert all the tests. Please spot if there are any problems with it, it seems to work properly.

I note that, apparently, we have several tests which are broken in current PHP(!)

--
Andrea Faulds
http://ajf.me/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.