Skip to content

Commit 37bb1c3

Browse files
orlitzkydevnexen
authored andcommitted
ext/gd: fix gh16559 and gh17349 tests
ext/gd/tests/gh16559.phpt: skip when using an external libgd This is a test for a bugfix in the bundled libgd. ext/gd/tests/gh17349.phpt: require PNG support This test loads a PNG image, so if an external libgd is being used, it has to support PNG. close GH-21987
1 parent 05afc37 commit 37bb1c3

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

ext/gd/tests/gh16559.phpt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
GH-16559 (UBSan abort in ext/gd/libgd/gd_interpolation.c:1007)
33
--EXTENSIONS--
44
gd
5+
--SKIPIF--
6+
<?php
7+
if (!GD_BUNDLED) {
8+
/* external libgd bugs are not our problem */
9+
die("skip meaningful only for bundled libgd\n");
10+
}
11+
?>
512
--FILE--
613
<?php
714
$input = imagecreatefrompng(__DIR__ . '/gh10614.png');

ext/gd/tests/gh17349.phpt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
GH-17349 (Tiled truecolor filling looses single color transparency)
33
--EXTENSIONS--
44
gd
5+
--SKIPIF--
6+
<?php
7+
if (!(imagetypes() & IMG_PNG)) {
8+
die("skip No PNG support");
9+
}
10+
?>
511
--FILE--
612
<?php
713
require_once __DIR__ . "/func.inc";

0 commit comments

Comments
 (0)