bjori Mon, 05 Sep 2011 11:07:38 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=316158
Log:
Fix the test in 5.4 and trunk.
older libraries will emmit error here, while new won't. So lets just suppress
it rather then making the test uselessly fail for random people.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_stream_filter.phpt
U php/php-src/branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt
U php/php-src/trunk/ext/iconv/tests/iconv_stream_filter.phpt
Modified: php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_stream_filter.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_stream_filter.phpt
2011-09-05 11:07:10 UTC (rev 316157)
+++ php/php-src/branches/PHP_5_3/ext/iconv/tests/iconv_stream_filter.phpt
2011-09-05 11:07:38 UTC (rev 316158)
@@ -22,7 +22,7 @@
$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
-var_dump(bin2hex(fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
+var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
var_dump(bin2hex(fread($fp, 5)) != "69636f6e76");
var_dump(bin2hex(fread($fp, 1)) != "0a");
fclose($fp);
Modified: php/php-src/branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt
2011-09-05 11:07:10 UTC (rev 316157)
+++ php/php-src/branches/PHP_5_4/ext/iconv/tests/iconv_stream_filter.phpt
2011-09-05 11:07:38 UTC (rev 316158)
@@ -22,7 +22,7 @@
$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
-var_dump(bin2hex(fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
+var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
var_dump(bin2hex(fread($fp, 5)) != "69636f6e76");
var_dump(bin2hex(fread($fp, 1)) != "0a");
fclose($fp);
@@ -34,8 +34,6 @@
string(20) "a4b3a4f3a4cba4c1a4cf"
string(10) "69636f6e76"
string(2) "0a"
-
-Warning: fread(): iconv stream filter ("ISO-2022-JP"=>"EUC-JP"): invalid
multibyte sequence in %s on line %d
bool(true)
bool(true)
bool(true)
Modified: php/php-src/trunk/ext/iconv/tests/iconv_stream_filter.phpt
===================================================================
--- php/php-src/trunk/ext/iconv/tests/iconv_stream_filter.phpt 2011-09-05
11:07:10 UTC (rev 316157)
+++ php/php-src/trunk/ext/iconv/tests/iconv_stream_filter.phpt 2011-09-05
11:07:38 UTC (rev 316158)
@@ -22,7 +22,7 @@
$fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb');
stream_filter_append($fp, 'string.rot13'); // this will make conversion fail.
stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP');
-var_dump(bin2hex(fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
+var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf");
var_dump(bin2hex(fread($fp, 5)) != "69636f6e76");
var_dump(bin2hex(fread($fp, 1)) != "0a");
fclose($fp);
@@ -34,8 +34,6 @@
string(20) "a4b3a4f3a4cba4c1a4cf"
string(10) "69636f6e76"
string(2) "0a"
-
-Warning: fread(): iconv stream filter ("ISO-2022-JP"=>"EUC-JP"): invalid
multibyte sequence in %s on line %d
bool(true)
bool(true)
bool(true)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php