Re: Patch and test cases too for

From: Date: Mon, 02 Mar 2009 20:35:00 +0000
Subject: Re: Patch and test cases too for
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-43233@lists.php.net to get a copy of this message
2009/3/2 Ilia Alshanetsky <ilia@prohost.org>: > I believe that this is a feature, so it would not go into 5.2, sorry. > > > Ilia Alshanetsky > That's OK. Just like to try these things sometimes. > > > > On 2-Mar-09, at 11:21 AM, Richard Quadling wrote: > >> Hi. >> >> Regarding http://bugs.php.net/bug.php?id=47493, I've >> supplied a patch >> to the unit tests too. >> >> Any chance this could get committed to 5.2+ >> >> >> >> Index: tests/002.phpt >> =================================================================== >> RCS file: /repository/php-src/ext/json/tests/002.phpt,v >> retrieving revision 1.3 >> diff -u -r1.3 002.phpt >> --- tests/002.phpt      27 May 2008 18:16:03 -0000      1.3 >> +++ tests/002.phpt      2 Mar 2009 16:16:13 -0000 >> @@ -1,4 +1,4 @@ >> ---TEST-- >> +--TEST-- >> json_encode() tests >> --SKIPIF-- >> <?php if (!extension_loaded("json")) print "skip"; ?> >> @@ -8,8 +8,14 @@ >> var_dump(json_encode("")); >> var_dump(json_encode(NULL)); >> var_dump(json_encode(TRUE)); >> + >> var_dump(json_encode(array(""=>""))); >> var_dump(json_encode(array(array(1)))); >> +var_dump(json_encode(array()); >> + >> +var_dump(json_encode(array(""=>"")), PHP_JSON_FORCE_HASH); >> +var_dump(json_encode(array(array(1))),PHP_JSON_FORCE_HASH); >> +var_dump(json_encode(array(),PHP_JSON_FORCE_HASH); >> >> var_dump(json_encode(1)); >> var_dump(json_encode("руссиш")); >> @@ -23,6 +29,10 @@ >> string(4) "true" >> string(7) "{"":""}" >> string(5) "[[1]]" >> +string(2) "[]" >> +string(7) "{"":""}" >> +string(15) "{"0":{"0":"1"}}" >> +string(2) "{}" >> string(1) "1" >> string(38) ""\u0440\u0443\u0441\u0441\u0438\u0448"" >> Done >> >> >> >> -- >> ----- >> Richard Quadling >> Zend Certified Engineer : >> http://zend.com/zce.php?c=ZEND002498&r=213474731 >> "Standing on the shoulders of some very clever giants!" >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"

« previous php.internals (#43233) next »