From: Dmitry Stogov Date: Wed, 16 Dec 2009 11:16:32 +0000 (+0000) Subject: Fixed tests X-Git-Tag: php-5.4.0alpha1~191^2~2206 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3b901796a6fad0448d71bfa288810fd878ab291;p=php Fixed tests --- diff --git a/ext/iconv/tests/eucjp2iso2022jp.phpt b/ext/iconv/tests/eucjp2iso2022jp.phpt index 3adacaf3db..a667f55558 100644 --- a/ext/iconv/tests/eucjp2iso2022jp.phpt +++ b/ext/iconv/tests/eucjp2iso2022jp.phpt @@ -18,8 +18,8 @@ function hexdump($str) { 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)); ?> diff --git a/ext/iconv/tests/eucjp2sjis.phpt b/ext/iconv/tests/eucjp2sjis.phpt index 4e0e52db88..563351f65d 100644 --- a/ext/iconv/tests/eucjp2sjis.phpt +++ b/ext/iconv/tests/eucjp2sjis.phpt @@ -10,7 +10,7 @@ unicode.output_encoding=ISO-8859-1 --EXPECT-- int(3) int(3) int(13) int(10) +int(10) +int(10) diff --git a/ext/iconv/tests/iconv_strpos.phpt b/ext/iconv/tests/iconv_strpos.phpt index 8cbed8d2aa..aa340396ec 100644 --- a/ext/iconv/tests/iconv_strpos.phpt +++ b/ext/iconv/tests/iconv_strpos.phpt @@ -30,9 +30,9 @@ foo("abecdbcdabef", "bcd", 100000); 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")); diff --git a/ext/iconv/tests/iconv_strrpos.phpt b/ext/iconv/tests/iconv_strrpos.phpt index 37e62b136e..9d5904056f 100644 --- a/ext/iconv/tests/iconv_strrpos.phpt +++ b/ext/iconv/tests/iconv_strrpos.phpt @@ -28,11 +28,11 @@ function foo($haystk, $needle, $to_charset = false, $from_charset = false) } 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", "")); diff --git a/ext/iconv/tests/iconv_substr.phpt b/ext/iconv/tests/iconv_substr.phpt index 0b2ef437a9..cbae9e6860 100644 --- a/ext/iconv/tests/iconv_substr.phpt +++ b/ext/iconv/tests/iconv_substr.phpt @@ -32,14 +32,14 @@ function bar($str, $offset, $len = false) { } 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 diff --git a/ext/phar/tests/front.phar.phpt b/ext/phar/tests/front.phar.phpt index ce961c200f..bab8ada0fd 100644 --- a/ext/phar/tests/front.phar.phpt +++ b/ext/phar/tests/front.phar.phpt @@ -13,7 +13,7 @@ Content-type: text/html; charset=UTF-8 --FILE_EXTERNAL-- files/blog.phar --EXPECTF-- -%string|unicode%(%d) " +string(%d) " localhost diff --git a/ext/standard/tests/file/bug12556.phpt b/ext/standard/tests/file/bug12556.phpt index a247dade94..78829d51ed 100644 --- a/ext/standard/tests/file/bug12556.phpt +++ b/ext/standard/tests/file/bug12556.phpt @@ -2,7 +2,7 @@ Bug #12556 (fgetcsv() ignores lengths when quotes not closed) --FILE--