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:
Christoph M. Becker 2024-07-11 18:12:38 +02:00
parent 0ed956dc69
commit 02a60be24d
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6

View file

@ -3,7 +3,7 @@ GH-13082 - imagefontwidth/height unexpectedly throwing an exception on a valid G
--EXTENSIONS--
gd
--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--
<?php
$font = imageloadfont(__DIR__ . "/gh13082.gdf");