Re: PHP 5.1 Release Candidate 1

From: Date: Sun, 31 Jul 2005 19:40:05 +0000
Subject: Re: PHP 5.1 Release Candidate 1
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-17473@lists.php.net to get a copy of this message
Today I was trying to reduce the number of tests that fail on my solaris boxes. (because I don't remember to see PHP pass all the tests) I needed to patch a couple of tests that didn't work well on that plataform. Detailed explanation (I hope): ext/date/tests/bug32555.phpt strftime is system/locale dependent. so I've changed it to use date() instead ext/date/tests/bug33532.phpt solaris strftime() doesnt support %z ext/date/tests/date_default_timezone_set-1.phpt ext/date/tests/date_default_timezone_get-1.phpt HAVE_TM_ZONE doesnt get set in solaris, so no "magic" guess is available (and thus no error message is produced) I'm not sure how to fix this. though. (I've tried to use a regex, but it becomes nasty. a simple skip condition would be usefull) ext/iconv/tests/eucjp2iso2022jp.phpt ext/iconv/tests/eucjp2sjis.phpt system's iconv() doesnt support those convertions. I hope somebody review my patch this time, so that it doesnt get lost as the other did (to fix tests on windows). Nuno P.S.: I really like John's idea. I think we could have an automated script on-line to produce those nice pages on a daily basis.

Index: ext/date/tests/bug32555.phpt =================================================================== RCS file: /repository/php-src/ext/date/tests/bug32555.phpt,v retrieving revision 1.2 diff -u -r1.2 bug32555.phpt --- ext/date/tests/bug32555.phpt 18 Jun 2005 19:21:10 -0000 1.2 +++ ext/date/tests/bug32555.phpt 31 Jul 2005 19:23:57 -0000 @@ -5,10 +5,11 @@ putenv("TZ=US/Eastern"); $stamp = 1112427000; -print strftime('%c %Z',strtotime('now',$stamp)) ."\n"; -print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n"; -print strftime('%c %Z',strtotime('+1 day',$stamp)) ."\n"; -print strftime('%c %Z',strtotime('+2 day',$stamp)) ."\n"; +$format = 'D M j H:i:s Y T'; +print date($format, strtotime('now',$stamp)) ."\n"; +print date($format, strtotime('tomorrow',$stamp)) ."\n"; +print date($format, strtotime('+1 day',$stamp)) ."\n"; +print date($format, strtotime('+2 day',$stamp)) ."\n"; ?> --EXPECT-- Sat Apr 2 02:30:00 2005 EST Index: ext/date/tests/bug33532.phpt =================================================================== RCS file: /repository/php-src/ext/date/tests/bug33532.phpt,v retrieving revision 1.1 diff -u -r1.1 bug33532.phpt --- ext/date/tests/bug33532.phpt 3 Jul 2005 19:14:55 -0000 1.1 +++ ext/date/tests/bug33532.phpt 31 Jul 2005 19:23:57 -0000 @@ -1,7 +1,8 @@ --TEST-- Bug #33532 (Different output for strftime() and date()) ---INI-- -error_reporting=2047 +--SKIPIF-- +<?php if (strftime('%z', time()) == "%z") + die('skip strftime does not support %z'); --FILE-- <?php putenv("TZ="); Index: ext/iconv/tests/eucjp2iso2022jp.phpt =================================================================== RCS file: /repository/php-src/ext/iconv/tests/eucjp2iso2022jp.phpt,v retrieving revision 1.5 diff -u -r1.5 eucjp2iso2022jp.phpt --- ext/iconv/tests/eucjp2iso2022jp.phpt 3 Jan 2003 05:16:12 -0000 1.5 +++ ext/iconv/tests/eucjp2iso2022jp.phpt 31 Jul 2005 19:23:57 -0000 @@ -2,6 +2,8 @@ EUC-JP to ISO-2022-JP --SKIPIF-- <?php /* include('skipif.inc'); */ ?> +<?php if(@iconv("EUC-JP", "ISO-2022-JP", 'dummy') === false) + die('skip EUC-JP to ISO-2022-JP not supported'); ?> --INI-- error_reporting=2039 --FILE-- Index: ext/iconv/tests/eucjp2sjis.phpt =================================================================== RCS file: /repository/php-src/ext/iconv/tests/eucjp2sjis.phpt,v retrieving revision 1.3 diff -u -r1.3 eucjp2sjis.phpt --- ext/iconv/tests/eucjp2sjis.phpt 29 Oct 2002 16:25:23 -0000 1.3 +++ ext/iconv/tests/eucjp2sjis.phpt 31 Jul 2005 19:23:57 -0000 @@ -2,6 +2,8 @@ EUC-JP to SJIS --SKIPIF-- <?php /* include('skipif.inc'); */ ?> +<?php if(@iconv("EUC-JP", "SJIS", 'dummy') === false) + die('skip EUC-JP to SJIS not supported'); ?> --INI-- error_reporting=2039 --FILE--
« previous php.internals (#17473) next »