Fixed freetype test on multiple environments
authorMatteo Beccati <mbeccati@php.net>
Tue, 16 Sep 2014 08:17:25 +0000 (10:17 +0200)
committerMatteo Beccati <mbeccati@php.net>
Tue, 16 Sep 2014 08:19:29 +0000 (10:19 +0200)
Some environments, apparently regardless to the freetype version, output 155, while others 156. I guess we can accept both ;)

This reverts commit 592df890276604c790d02be26b1b3c3710b3b888.

ext/gd/tests/bug48801_1.phpt
ext/gd/tests/bug48801_2.phpt [deleted file]

index ef2aa1dba7ef7bbea3fa5bc3fac8dc3e670d0abf..0ab6d7cdd9f4a78cbd551aae26a2617ee40d47a9 100644 (file)
@@ -1,13 +1,12 @@
 --TEST--
-Bug #48801 (Problem with imagettfbbox) freetype >= 2.4.10 and < 2.4.12
+Bug #48801 (Problem with imagettfbbox) freetype >= 2.4.10
 --SKIPIF--
 <?php
        if(!extension_loaded('gd')){ die('skip gd extension not available'); }
        if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
 
        include dirname(__FILE__) . '/func.inc';
-       if(version_compare(get_freetype_version(), '2.4.10') < 0) die('skip for freetype >= 2.4.10');
-       if(version_compare(get_freetype_version(), '2.4.12') >= 0) die('skip for freetype < 2.4.12');
+       if(version_compare(get_freetype_version(), '2.4.10') == -1) die('skip for freetype >= 2.4.10');
 ?>
 --FILE--
 <?php
@@ -21,6 +20,6 @@ echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
 ?>
 --EXPECTF--
 (-1, 15)
-(156, 15)
-(156, -48)
+(15%d, 15)
+(15%d, -48)
 (-1, -48)
diff --git a/ext/gd/tests/bug48801_2.phpt b/ext/gd/tests/bug48801_2.phpt
deleted file mode 100644 (file)
index b2a719f..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-Bug #48801 (Problem with imagettfbbox) freetype >= 2.4.12
---SKIPIF--
-<?php
-       if(!extension_loaded('gd')){ die('skip gd extension not available'); }
-       if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
-
-       include dirname(__FILE__) . '/func.inc';
-       if(version_compare(get_freetype_version(), '2.4.12') < 0) die('skip for freetype >= 2.4.12');
-?>
---FILE--
-<?php
-$cwd = dirname(__FILE__);
-$font = "$cwd/Tuffy.ttf";
-$bbox = imageftbbox(50, 0, $font, "image");
-echo '(' . $bbox[0] . ', ' . $bbox[1] . ")\n";
-echo '(' . $bbox[2] . ', ' . $bbox[3] . ")\n";
-echo '(' . $bbox[4] . ', ' . $bbox[5] . ")\n";
-echo '(' . $bbox[6] . ', ' . $bbox[7] . ")\n";
-?>
---EXPECTF--
-(-1, 15)
-(155, 15)
-(155, -48)
-(-1, -48)