]> granicus.if.org Git - php/commitdiff
Test case for bug #42434
authorKalle Sommer Nielsen <kalle@php.net>
Thu, 30 Jul 2009 03:54:27 +0000 (03:54 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Thu, 30 Jul 2009 03:54:27 +0000 (03:54 +0000)
ext/gd/tests/bug42434.phpt [new file with mode: 0644]

diff --git a/ext/gd/tests/bug42434.phpt b/ext/gd/tests/bug42434.phpt
new file mode 100644 (file)
index 0000000..cede1ac
--- /dev/null
@@ -0,0 +1,26 @@
+--TEST--\r
+Bug #42434 (ImageLine w/ antialias = 1px shorter)\r
+--SKIPIF--\r
+<?php\r
+if (!extension_loaded('gd')) {\r
+       die('skip gd extension not available');\r
+}\r
+?>\r
+--FILE--\r
+<?php\r
+$im = imagecreatetruecolor(10, 2);\r
+imagefilledrectangle($im, 0, 0, 10, 2, 0xFFFFFF);\r
+\r
+imageantialias($im, true);\r
+imageline($im, 0, 0, 10, 0, 0x000000);\r
+\r
+if (imagecolorat($im, 9, 0) == 0x000000) {\r
+       echo 'DONE';\r
+} else {\r
+       echo 'Bugged';\r
+}\r
+\r
+imagedestroy($im);\r
+?>\r
+--EXPECTF--\r
+DONE
\ No newline at end of file