com php-src: Fix FreeType tests using UTF-8 font file names: ext/gd/tests/bug48732-mb.phpt ext/gd/tests/bug48801-mb.phpt
| From: | Christoph Michael Becker | Date: | Fri, 23 Sep 2016 13:49:21 +0000 |
| Subject: | com php-src: Fix FreeType tests using UTF-8 font file names: ext/gd/tests/bug48732-mb.phpt ext/gd/tests/bug48801-mb.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94643@lists.php.net to get a copy of this message | ||
Commit: bf35b31f56c141d16ae51cbcb0499fbb701ccb81
Author: Christoph M. Becker <cmb@php.net> Fri, 23 Sep 2016 15:22:45 +0200
Committer: Christoph M. Becker <cmbecker69@gmx.de> Fri, 23 Sep 2016 15:49:21 +0200
Parents: 974ba6be7a20d277723e6e7f9976219796dba7c0
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=bf35b31f56c141d16ae51cbcb0499fbb701ccb81
Log:
Fix FreeType tests using UTF-8 font file names
UTF-8 font file names are not yet supported on Windows[1], so we're skipping
the respective tests on this platform, but enable them on other platforms.
[1] <http://news.php.net/php..internals.win/1142>
Changed paths:
M ext/gd/tests/bug48732-mb.phpt
M ext/gd/tests/bug48801-mb.phpt
Diff:
diff --git a/ext/gd/tests/bug48732-mb.phpt b/ext/gd/tests/bug48732-mb.phpt
index 7713e51..42871ee 100644
--- a/ext/gd/tests/bug48732-mb.phpt
+++ b/ext/gd/tests/bug48732-mb.phpt
@@ -4,12 +4,8 @@ Bug #48732 (TTF Bounding box wrong for letters below baseline)
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
if(!function_exists('imagefttext')) die('skip imagefttext() not available');
- if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only for Windows');
- }
+ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet
supported on Windows');
?>
---XFAIL--
-seems freetype issue, to investigate
--FILE--
<?php
$cwd = dirname(__FILE__);
@@ -24,4 +20,4 @@ echo 'Left Bottom: (' . $bbox[0] . ', ' . $bbox[1] .
')';
--CLEAN--
<?php @unlink(dirname(__FILE__) .
'/bug48732私はガラスを食べられます.png'); ?>
--EXPECTF--
-Left Bottom: (0, 47)
+Left Bottom: (0, 46)
diff --git a/ext/gd/tests/bug48801-mb.phpt b/ext/gd/tests/bug48801-mb.phpt
index c2b6b45..a2f6d28 100644
--- a/ext/gd/tests/bug48801-mb.phpt
+++ b/ext/gd/tests/bug48801-mb.phpt
@@ -4,6 +4,7 @@ Bug #48801 (Problem with imagettfbbox)
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet
supported on Windows');
?>
--FILE--
<?php