From 7bfb7b62b1fa2a8a21c3718111424c80b91f6505 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Thu, 15 Sep 2016 00:34:55 +0200 Subject: [PATCH] Fix and reactivate regression test for bug #50194 Apparently, different FreeType versions render the string differently, so we have to cater to these slight differences. Unfortunately, the testing framework doesn't yet offer a clean API for this, so we work around the limitations by parsing and checking the output of test_image_equals_file(). --- ext/gd/tests/bug50194.phpt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ext/gd/tests/bug50194.phpt b/ext/gd/tests/bug50194.phpt index 4b41a3a7027..f68165be42c 100644 --- a/ext/gd/tests/bug50194.phpt +++ b/ext/gd/tests/bug50194.phpt @@ -4,7 +4,7 @@ Bug #50194 (imagettftext broken on transparent background w/o alphablending) --FILE-- 2000) { + echo "The images differ in {$matches[1]} pixels.\n"; +} else { + echo "The images are similar.\n"; +} imagedestroy($im); ?> ===DONE=== --EXPECT-- -The images are equal. +The images are similar. ===DONE===