mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix skip condition of gh13082.phpt
The test failure is not particularly related to Travis, but rather is
caused by the GD font file to only be suitable for platforms where
`int` stores 32bit values in little endian byte order. This platform
dependence is documented in the source code[1]. Thus we fix the skip
condition and skip reason accordingly.
An alternative would be to dynamically create the font file just before
running the test, but that appears to be overkill.
[1] <d59691c02f/ext/gd/gd.c (L545-L556)>
Closes GH-14922.
This commit is contained in:
@@ -3,7 +3,7 @@ GH-13082 - imagefontwidth/height unexpectedly throwing an exception on a valid G
|
|||||||
--EXTENSIONS--
|
--EXTENSIONS--
|
||||||
gd
|
gd
|
||||||
--SKIPIF--
|
--SKIPIF--
|
||||||
<?php if (getenv('TRAVIS')) die('skip Currently fails on Travis'); ?>
|
<?php if (pack('i', 0x01020304) !== "\x04\x03\x02\x01") die('skip unsupported platform'); ?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
$font = imageloadfont(__DIR__ . "/gh13082.gdf");
|
$font = imageloadfont(__DIR__ . "/gh13082.gdf");
|
||||||
|
|||||||
Reference in New Issue
Block a user