]> granicus.if.org Git - php/commitdiff
- imagetypes test
authorPierre Joye <pajoye@php.net>
Mon, 26 Dec 2005 17:15:51 +0000 (17:15 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 26 Dec 2005 17:15:51 +0000 (17:15 +0000)
- copyresized title

ext/gd/tests/copyresized.phpt
ext/gd/tests/types.phpt [new file with mode: 0644]

index 85eabd8664efa8fb669f1f16d20a2de6de3621fd..fe98642dbb89ccda45025826581491c2361da198 100644 (file)
@@ -1,8 +1,8 @@
 --TEST--
-imagecopy
+imagecopyresized
 --SKIPIF--
 <?php
-        if (!function_exists('imagecopy')) die("skip gd extension not available\n");
+        if (!function_exists('imagecopyresized')) die("skip gd extension not available\n");
 ?>
 --FILE--
 <?php
diff --git a/ext/gd/tests/types.phpt b/ext/gd/tests/types.phpt
new file mode 100644 (file)
index 0000000..0b79e78
--- /dev/null
@@ -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