diff options
Diffstat (limited to 'ext/gd/tests/types.phpt')
-rw-r--r-- | ext/gd/tests/types.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ext/gd/tests/types.phpt b/ext/gd/tests/types.phpt new file mode 100644 index 0000000..0b79e78 --- /dev/null +++ b/ext/gd/tests/types.phpt @@ -0,0 +1,33 @@ +--TEST-- +imagetypes +--SKIPIF-- +<?php + if (!function_exists('imagetypes')) die("skip gd extension not available\n"); +?> +--FILE-- +<?php +$flags = imagetypes(); + +if ($flags&0x1 && !function_exists("imagegif")) { + echo "gif failed\n"; +} + +if ($flags&0x2 && !function_exists("imagejpeg")) { + echo "jpeg failed\n"; +} + +if ($flags&0x4 && !function_exists("imagepng")) { + echo "png failed\n"; +} + +if ($flags&0x8 && !function_exists("imagewbmp")) { + echo "wbmp failed\n"; +} + +if ($flags&16 && !function_exists("imagecreatefromxpm")) { + echo "xom failed\n"; +} +echo "ok\n"; +?> +--EXPECTF-- +ok |