hirokawa Sat, 24 Sep 2011 02:11:48 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=317230
Log: added tests for #40685. Bug: https://bugs.php.net/40685 (Bogus) '&&&' => '&&' at mb_decode_numericentity Changed paths: A php/php-src/trunk/ext/mbstring/tests/bug40685.phpt Added: php/php-src/trunk/ext/mbstring/tests/bug40685.phpt =================================================================== --- php/php-src/trunk/ext/mbstring/tests/bug40685.phpt (rev 0) +++ php/php-src/trunk/ext/mbstring/tests/bug40685.phpt 2011-09-24 02:11:48 UTC (rev 317230) @@ -0,0 +1,25 @@ +--TEST-- +Bug #40685 (mb_decode_numericentity() removes '&' in the string) +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +$map = array(0, 0x10FFFF, 0, 0xFFFFFF); +var_dump(mb_decode_numericentity('&', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&#', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&#x', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +?> +--EXPECTF-- +string(1) "&" +string(3) "&&&" +string(2) "&#" +string(3) "&#x" +string(4) "=" +string(5) "=" +string(1) "=" +string(1) "=" Property changes on: php/php-src/trunk/ext/mbstring/tests/bug40685.phpt ___________________________________________________________________ Added: svn:keywords + Id Rev Revision Added: svn:eol-style + native
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php