com php-src: Replace md5 image comparision with test_image_ equals_file(): ext/gd/tests/bug22544-mb.p hpt "ext/gd/tests/bug22544\347\24
7\201\343\201\257\343 \202\254\343\203\251\ 343\202\271\343\202\2 22\351\243\237\343\20 1\271\343\202\211\343 \202\214\343\201\276\ 343\201\231.png"
| From: | Christoph Michael Becker | Date: | Sun, 11 Sep 2016 12:56:11 +0000 |
| Subject: | com php-src: Replace md5 image comparision with test_image_ equals_file(): ext/gd/tests/bug22544-mb.p hpt "ext/gd/tests/bug22544\347\24 7\201\343\201\257\343 \202\254\343\203\251\ 343\202\271\343\202\2 22\351\243\237\343\20 1\271\343\202\211\343 \202\214\343\201\276\ 343\201\231.png" |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94424@lists.php.net to get a copy of this message | ||
Commit: 29cb3c89e50376f254e6a63cf76ac96dd309b366
Author: Christoph M. Becker <cmbecker69@gmx.de> Sun, 11 Sep 2016 14:56:11 +0200
Parents: b843d655999e996f94d2050315a9c584139f1c80
Branches: PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=29cb3c89e50376f254e6a63cf76ac96dd309b366
Log:
Replace md5 image comparision with test_image_equals_file()
Changed paths:
M ext/gd/tests/bug22544-mb.phpt
A
"ext/gd/tests/bug22544\347\247\201\343\201\257\343\202\254\343\203\251\343\202\271\343\202\222\351\243\237\343\201\271\343\202\211\343\202\214\343\201\276\343\201\231.png"
Diff:
diff --git a/ext/gd/tests/bug22544-mb.phpt b/ext/gd/tests/bug22544-mb.phpt
index d4f5929..0847214 100644
--- a/ext/gd/tests/bug22544-mb.phpt
+++ b/ext/gd/tests/bug22544-mb.phpt
@@ -8,16 +8,13 @@ Bug #22544 (TrueColor transparency in PNG images).
?>
--FILE--
<?php
- $dest = dirname(realpath(__FILE__)) .
'/bug22544私はガラスを食べられます.png';
- @unlink($dest);
$image = imageCreateTruecolor(640, 100);
$transparent = imageColorAllocate($image, 0, 0, 0);
$red = imageColorAllocate($image, 255, 50, 50);
imageColorTransparent($image, $transparent);
imageFilledRectangle($image, 0, 0, 640-1, 100-1, $transparent);
- imagegd($image, $dest);
- echo md5_file($dest) . "\n";
- @unlink($dest);
+ include_once __DIR__ . '/func.inc';
+ test_image_equals_file(__DIR__ . '/bug22544私はガラスを食べられます.png',
$image);
?>
--EXPECT--
-7643ef115f642a79c2de6e411f485ddd
+The images are equal.
diff --git
"a/ext/gd/tests/bug22544\347\247\201\343\201\257\343\202\254\343\203\251\343\202\271\343\202\222\351\243\237\343\201\271\343\202\211\343\202\214\343\201\276\343\201\231.png"
"b/ext/gd/tests/bug22544\347\247\201\343\201\257\343\202\254\343\203\251\343\202\271\343\202\222\351\243\237\343\201\271\343\202\211\343\202\214\343\201\276\343\201\231.png"
new file mode 100644
index 0000000..5e6251f
Binary files /dev/null and
"b/ext/gd/tests/bug22544\347\247\201\343\201\257\343\202\254\343\203\251\343\202\271\343\202\222\351\243\237\343\201\271\343\202\211\343\202\214\343\201\276\343\201\231.png"
differ