Add more gd tests

This commit is contained in:
cytopia
2019-11-18 17:58:00 +01:00
parent 806b408878
commit 83124e8632
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
$arr = gd_info();
if (!isset($arr['FreeType Support'])) {
echo 'FAIL: FreeType Support array key does not exist.';
exit(1);
}
if ($arr['FreeType Support'] !== TRUE) {
echo 'FAIL: No FreeType support.';
exit(1);
}
echo 'OK';

View File

@@ -0,0 +1,16 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Check for XPM support
// https://www.php.net/manual/en/function.imagetypes.php
if (!(imagetypes() & IMG_XPM)) {
echo 'FAIL: No XMP support';
exit(1);
}
echo 'OK';