Annotation of embedaddon/php/ext/mbstring/tests/bug40685.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Bug #40685 (mb_decode_numericentity() removes '&' in the string)
                      3: --SKIPIF--
                      4: <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
                      5: --FILE--
                      6: <?php
                      7: $map = array(0, 0x10FFFF, 0, 0xFFFFFF);
                      8: var_dump(mb_decode_numericentity('&', $map, 'UTF-8'));
                      9: var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8'));
                     10: var_dump(mb_decode_numericentity('&#', $map, 'UTF-8'));
1.1.1.2 ! misho      11: var_dump(mb_decode_numericentity('&#x', $map, 'UTF-8'));
1.1       misho      12: var_dump(mb_decode_numericentity('&#61', $map, 'UTF-8'));
1.1.1.2 ! misho      13: var_dump(mb_decode_numericentity('&#x3d', $map, 'UTF-8'));
1.1       misho      14: var_dump(mb_decode_numericentity('&#61;', $map, 'UTF-8'));
1.1.1.2 ! misho      15: var_dump(mb_decode_numericentity('&#x3d;', $map, 'UTF-8'));
1.1       misho      16: ?>
                     17: --EXPECTF--
                     18: string(1) "&"
                     19: string(3) "&&&"
                     20: string(2) "&#"
1.1.1.2 ! misho      21: string(3) "&#x"
1.1       misho      22: string(4) "&#61"
1.1.1.2 ! misho      23: string(5) "&#x3D"
        !            24: string(1) "="
1.1       misho      25: string(1) "="

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>