On Mon, 21 Oct 2002, Yasuo Ohgaki wrote:

> Derick Rethans wrote:
> > On Mon, 21 Oct 2002, Yasuo Ohgaki wrote:
> > 
> > 
> >>Derick Rethans wrote:
> >>
> >>>That's why you can run only one test with:
> >>>PHP_TEST_EXECUTABLE=sapi/cli/php php run-tests ext/mbstring/tests/027.phpt
> >>
> >>Does it work for you ?
> >>
> >>[yohgaki@dev DEV]$ TEST_PHP_EXECUTABLE=sapi/cli/php php run-tests.php 
>ext/mbstring/tests/025.ppt
> > 
> > 
> > It's phpt, not  ppt as extension.
> 
> It's just readline/terminal messed line a little with up allow key.
> Correct command is passed and if file does not exist, error
> message differs. It does not work for me at least.
> 
> Running tests certain dir does not work for a long time,
> also.
> 
> You haven't the answer question, does it work for you?

Yes, works fine here:

[derick@kossu php-4.3.0dev]$ pwd
/dat/dev/php/php-4.3.0dev
[derick@kossu php-4.3.0dev]$ TEST_PHP_EXECUTABLE=sapi/cli/php php 
run-tests.php ext/mbstring/tests/025.*

=====================================================================
CWD         : /dat/dev/php/php-4.3.0dev
PHP         : sapi/cli/php
PHP_SAPI    : cli
PHP_VERSION : 4.3.0-dev
PHP_OS      : Linux
INI actual  : /etc/httpd/php.ini
More .INIs  : 
Extra dirs  : 
=====================================================================
Running selected tests.
PASS mb_regex_set_options() [ext/mbstring/tests/025.phpt]

(even with * instead of 025.*)

> >>In addition, I don't know if CGI binary can be used under my
> >>environment(Linux). It never worked for me since the default
> >>binary became CLI.
> > 
> > 
> > It doesn't work because of chdir() issues. Easy to fix though. If I have 
> > some time I make special SAPI wrappers for the testsuite.
> 
> run-tests.php never worked with CGI since it made run with
> CLI.
> 
> I didn't try to look into, if it's easy to fix, it should
> be fixed :)

It's not easy to do it in a clean way.

> >>Anyway, Including test code in phpt does not make much sense to me.
> >>I keep binary like php-cgi-4.0.4pl1, php-cgi-4.0.6-debug, etc, etc.
> >>Plain source file is still very useful to check old behavior
> >>quickly.
> >>
> >>It isn't so important to put php source in phpt.
> > 
> > 
> > Consistency is important
> > 
> 
> Including file is not hurt consistency nor readability
> nor usability, IMHO.

Your opinion is clearly different then.

> 
> I don't mind if anyone willing to spent time
> to copy & paste included files, but separated php source
> is more useful. i.e. execute script with different versions of
> php quickly, easier to check & correct what's wrong test
> script itself, easier to check different parameters, easier
> to test with CGI bin, etc.
> 
> Is there any good reason to keep everything in phpt?
> (I mean does it make things easy, usable, etc?)

One test, one file.

Derick
--

---------------------------------------------------------------------------
 Derick Rethans                                   http://derickrethans.nl/ 
 JDI Media Solutions
--------------[ if you hold a unix shell to your ear, do you hear the c? ]-


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to