rasmus Sun, 26 Jul 2009 07:21:02 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=286352
Log: Fix 2 broken json tests. json_decode() returns a binary string, not unicode for efficiency, and if you are going to test invalid utf8 in a test, you have to stuff it into a binary string or it will be valid unicode by definition. Changed paths: U php/php-src/trunk/ext/json/tests/bug42785.phpt U php/php-src/trunk/ext/json/tests/bug43941.phpt Modified: php/php-src/trunk/ext/json/tests/bug42785.phpt =================================================================== --- php/php-src/trunk/ext/json/tests/bug42785.phpt 2009-07-26 04:40:36 UTC (rev 286351) +++ php/php-src/trunk/ext/json/tests/bug42785.phpt 2009-07-26 07:21:02 UTC (rev 286352) @@ -23,5 +23,5 @@ ?> --EXPECTF-- Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d -unicode(13) "[100.1,"bar"]" -unicode(21) "{"a":100.1,"b":"foo"}" +string(13) "[100.1,"bar"]" +string(21) "{"a":100.1,"b":"foo"}" Modified: php/php-src/trunk/ext/json/tests/bug43941.phpt =================================================================== --- php/php-src/trunk/ext/json/tests/bug43941.phpt 2009-07-26 04:40:36 UTC (rev 286351) +++ php/php-src/trunk/ext/json/tests/bug43941.phpt 2009-07-26 07:21:02 UTC (rev 286352) @@ -5,10 +5,10 @@ --FILE-- <?php -var_dump(json_encode("abc")); -var_dump(json_encode("ab\xE0")); -var_dump(json_encode("ab\xE0c")); -var_dump(json_encode(array("ab\xE0", "ab\xE0c", "abc"))); +var_dump(json_encode(b"abc")); +var_dump(json_encode(b"ab\xE0")); +var_dump(json_encode(b"ab\xE0c")); +var_dump(json_encode(array(b"ab\xE0", b"ab\xE0c", b"abc"))); echo "Done\n"; ?>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php