dmitry Wed, 16 Dec 2009 11:16:32 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=292197
Log: Fixed tests Changed paths: U php/php-src/trunk/ext/iconv/tests/eucjp2iso2022jp.phpt U php/php-src/trunk/ext/iconv/tests/eucjp2sjis.phpt U php/php-src/trunk/ext/iconv/tests/eucjp2utf8.phpt U php/php-src/trunk/ext/iconv/tests/iconv_strlen.phpt U php/php-src/trunk/ext/iconv/tests/iconv_strpos.phpt U php/php-src/trunk/ext/iconv/tests/iconv_strrpos.phpt U php/php-src/trunk/ext/iconv/tests/iconv_substr.phpt U php/php-src/trunk/ext/phar/tests/front.phar.phpt U php/php-src/trunk/ext/standard/tests/file/bug12556.phpt U php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt U php/php-src/trunk/ext/standard/tests/strings/strcasecmp.phpt U php/php-src/trunk/ext/standard/tests/strings/strcmp.phpt Modified: php/php-src/trunk/ext/iconv/tests/eucjp2iso2022jp.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/eucjp2iso2022jp.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/eucjp2iso2022jp.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -18,8 +18,8 @@ print "\n"; } -$str = str_repeat("���ܸ��ƥ����Ȥ� English text", 30); -$str .= "���ܸ�"; +$str = str_repeat(b"���ܸ��ƥ����Ȥ� English text", 30); +$str .= b"���ܸ�"; echo hexdump(iconv("EUC-JP", "ISO-2022-JP", $str)); ?> Modified: php/php-src/trunk/ext/iconv/tests/eucjp2sjis.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/eucjp2sjis.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/eucjp2sjis.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -10,7 +10,7 @@ <?php /* charset=EUC-JP */ -$str = " +$str = b" ���ܸ��ƥ����Ȥ�English Text ���ܸ��ƥ����Ȥ�English Text ���ܸ��ƥ����Ȥ�English Text Modified: php/php-src/trunk/ext/iconv/tests/eucjp2utf8.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/eucjp2utf8.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/eucjp2utf8.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -10,7 +10,7 @@ <?php /* charset=EUC-JP */ -$str = " +$str = b" ���ܸ��ƥ����Ȥ�English Text ���ܸ��ƥ����Ȥ�English Text ���ܸ��ƥ����Ȥ�English Text Modified: php/php-src/trunk/ext/iconv/tests/iconv_strlen.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/iconv_strlen.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/iconv_strlen.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -12,11 +12,14 @@ var_dump(iconv_strlen($str, $charset)); } -foo("abc", "ASCII"); -foo("���ܸ� EUC-JP", "EUC-JP"); +foo(b"abc", "ASCII"); +foo(b"���ܸ� EUC-JP", "EUC-JP"); +foo(unicode_decode(b"���ܸ� EUC-JP", "EUC-JP"), "EUC-JP"); ?> --EXPECT-- int(3) int(3) int(13) int(10) +int(10) +int(10) Modified: php/php-src/trunk/ext/iconv/tests/iconv_strpos.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/iconv_strpos.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/iconv_strpos.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -30,9 +30,9 @@ foo("abcabcabcdabcababcdabc", "bcd", 0); foo("abcabcabcdabcababcdabc", "bcd", 10); foo(str_repeat("abcab", 60)."abcdb".str_repeat("adabc", 60), "abcd", 0); -foo(str_repeat("����������", 30)."����������".str_repeat("����������", 30), "����", 0, "EUC-JP"); -$str = str_repeat("����������", 60).'$'.str_repeat("����������", 60); -foo($str, '$', 0, "ISO-2022-JP", "EUC-JP"); +foo(str_repeat(b"����������", 30).b"����������".str_repeat(b"����������", 30), b"����", 0, "EUC-JP"); +$str = str_repeat(b"����������", 60).b'$'.str_repeat(b"����������", 60); +foo($str, b'$', 0, "ISO-2022-JP", "EUC-JP"); var_dump(iconv_strpos("string", "")); var_dump(iconv_strpos("", "string")); Modified: php/php-src/trunk/ext/iconv/tests/iconv_strrpos.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/iconv_strrpos.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/iconv_strrpos.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -28,11 +28,11 @@ } foo("abecdbcdabcdef", "bcd"); foo(str_repeat("abcab", 60)."abcdb".str_repeat("adabc", 60), "abcd"); -foo(str_repeat("����������", 30)."����������".str_repeat("����������", 30), "����", "EUC-JP"); +foo(str_repeat(b"����������", 30).b"����������".str_repeat(b"����������", 30), b"����", "EUC-JP"); for ($i = 0; $i <=6; ++$i) { - $str = str_repeat("����������", 60).str_repeat('$', $i).str_repeat("����������", 60); - foo($str, '$', "ISO-2022-JP", "EUC-JP"); + $str = str_repeat(b"����������", 60).str_repeat(b'$', $i).str_repeat(b"����������", 60); + foo($str, b'$', "ISO-2022-JP", "EUC-JP"); } var_dump(iconv_strrpos("string", "")); Modified: php/php-src/trunk/ext/iconv/tests/iconv_substr.phpt =================================================================== --- php/php-src/trunk/ext/iconv/tests/iconv_substr.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/iconv/tests/iconv_substr.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -32,14 +32,14 @@ } foo("abcdefghijklmnopqrstuvwxyz", 5, 7, "ASCII"); -foo("��������������������������", 5, 7, "EUC-JP"); +foo(b"��������������������������", 5, 7, "EUC-JP"); bar("This is a test", 100000); bar("This is a test", 0, 100000); bar("This is a test", -3); bar("This is a test", 0, -9); bar("This is a test", 0, -100000); bar("This is a test", -9, -100000); -var_dump(iconv("ISO-2022-JP", "EUC-JP", iconv_substr(iconv("EUC-JP", "ISO-2022-JP", "�����ˤ��� ISO-2022-JP"), 3, 8, "ISO-2022-JP"))); +var_dump(iconv("ISO-2022-JP", "EUC-JP", iconv_substr(iconv("EUC-JP", "ISO-2022-JP", b"�����ˤ��� ISO-2022-JP"), 3, 8, "ISO-2022-JP"))); ?> --EXPECT-- 666768696a6b6c Modified: php/php-src/trunk/ext/phar/tests/front.phar.phpt =================================================================== --- php/php-src/trunk/ext/phar/tests/front.phar.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/phar/tests/front.phar.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -13,7 +13,7 @@ --FILE_EXTERNAL-- files/blog.phar --EXPECTF-- -%string|unicode%(%d) "<xml version="1.0" encoding="UTF-8"> +string(%d) "<xml version="1.0" encoding="UTF-8"> <config> <database> <host>localhost</name> Modified: php/php-src/trunk/ext/standard/tests/file/bug12556.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/file/bug12556.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/standard/tests/file/bug12556.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -2,7 +2,7 @@ Bug #12556 (fgetcsv() ignores lengths when quotes not closed) --FILE-- <?php -$fp = fopen(dirname(__FILE__)."/test.csv", "r"); +$fp = fopen(dirname(__FILE__)."/test.csv", "rt"); while($line = fgetcsv($fp, 24)) { $line = str_replace("\x0d\x0a", "\x0a", $line); var_dump($line); Modified: php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/standard/tests/strings/md5_file.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -86,6 +86,8 @@ ?> --EXPECTF-- *** Testing foe error conditions *** + +Warning: md5_file(): Filename cannot be empty in %s on line %d bool(false) Warning: md5_file(a): failed to open stream: No such file or directory in %s on line %d @@ -93,6 +95,8 @@ Warning: md5_file(12): failed to open stream: No such file or directory in %s on line %d bool(false) + +Warning: md5_file(): Filename cannot be empty in %s on line %d bool(false) Warning: md5_file() expects at least 1 parameter, 0 given in %s on line %d Modified: php/php-src/trunk/ext/standard/tests/strings/strcasecmp.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/strings/strcasecmp.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/standard/tests/strings/strcasecmp.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -1,6 +1,8 @@ --TEST-- strcasecmp() tests --INI-- +unicode.script_encoding=ISO-8859-1 +unicode.output_encoding=ISO-8859-1 precision = 12 --FILE-- <?php Modified: php/php-src/trunk/ext/standard/tests/strings/strcmp.phpt =================================================================== --- php/php-src/trunk/ext/standard/tests/strings/strcmp.phpt 2009-12-16 11:16:03 UTC (rev 292196) +++ php/php-src/trunk/ext/standard/tests/strings/strcmp.phpt 2009-12-16 11:16:32 UTC (rev 292197) @@ -1,6 +1,8 @@ --TEST-- strcmp() tests --INI-- +unicode.script_encoding=ISO-8859-1 +unicode.output_encoding=ISO-8859-1 precision = 12 --FILE-- <?php
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php