Re: UEXPECTF is gone: any way to write "portable" tests?

From: Date: Wed, 23 Jul 2008 11:09:22 +0000
Subject: Re: UEXPECTF is gone: any way to write "portable" tests?
References: 1 2  Groups: php.qa 
Request: Send a blank email to php-qa+get-64390@lists.php.net to get a copy of this message
Hi Felix! Felix De Vliegher schrieb:
+1 on this one. I once actually thought this was the expected behaviour of the UEXPECT(F) part :-)
I don't know what the original intention was: protability or the two different run modes of the early PHP 6 versions.
Of all the tests I wrote that had a difference between PHP5 and PHP6, only one actually had more changes needed than just output related, so
ACK. There are more differences here and there in my case, but it really affects a minority of the tests. In any case the differences do not justify using two distinct files most of the time.
it would make work easier. The only drawback is that using the same name might confuse some people (but the name makes the most sense).
UEXPECT has been the name in early PHP 6 versions. Except of the MySQL tests only one iconv test seems to be still using UEXPECT. MySQL has been an early adaptor of PHP 6 and unicode which seems to bite us now. But its not only that I'm lazy about changing MySQL tests. There's also the maintenance argument: one test file for both PHP 5 and PHP 6 instead of two files that need to be keept in sync. The patch (against HEAD) I suggest: http://ulf-wendel.de/run_tests_diff The different semantics I am asking for: PHP 5 - no changes, always use EXPECTF PHP 6 - if you find both UEXPECF and EXPECTF, use UEXPECTF The difference it makes on my box in terms of failed tests:
   patched: Tests failed    :  340 (  4.6%) (  6.8%)
 unpatched: Tests failed    :  411 (  5.5%) (  8.2%)
Ulf

« previous php.qa (#64390) next »