Annotation of embedaddon/php/ext/gd/tests/bug48555.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Bug #48555 (ImageFTBBox() differs from previous versions for texts with new lines)
                      3: --SKIPIF--
                      4: <?php
                      5:        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
                      6:        if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
                      7: ?>
                      8: --FILE--
                      9: <?php
                     10: $cwd = dirname(__FILE__);
                     11: $font = "$cwd/Tuffy.ttf";
                     12: $box = ImageFTBBox(14, 0, $font, "Text without line-break");
1.1.1.2 ! misho      13: //echo 'Top without line-break: ' . $box[7] . "\n";
        !            14: $without_line_break = $box[7];
1.1       misho      15: $box = ImageFTBBox(14, 0, $font, "Text with\nline-break\none more");
1.1.1.2 ! misho      16: //echo 'Top with line-break: ' . $box[7] . "\n";
        !            17: $with_line_break = $box[7];
        !            18: 
        !            19: var_dump($without_line_break);
        !            20: var_dump($with_line_break);
        !            21: if ($with_line_break==$without_line_break) {
        !            22:   echo "with line break == without line break".PHP_EOL;
        !            23: } else {
        !            24:   echo "with line break != without line break".PHP_EOL;        
        !            25: }
        !            26: 
1.1       misho      27: ?>
                     28: --EXPECTF--
1.1.1.2 ! misho      29: int(-%d)
        !            30: int(-%d)
        !            31: with line break == without line break

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