Skip Menu |

This queue is for tickets about the Template-Toolkit CPAN distribution.

Report information
The Basics
Id: 7864
Status: resolved
Priority: 0/
Queue: Template-Toolkit

People
Owner: Nobody in particular
Requestors: SMPETERS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: t/gd.t Test 7 fails in version 2.14
Below is the test output along with relevent Perl information steve@kirk Template-Toolkit-2.14 # prove -b -v t/gd.t t/gd....1..11 ok 1 - running test_expect() ok 2 - template processor is engaged ok 3 - input read and split into 4 tests ok 4 - template text 1 processed OK: [% FILTER replace('.');\n #\n ... ok 5 - template text 1 matched expected ok 6 - template text 2 processed OK: [% FILTER replace('.');\n #\n ... MATCH FAILED input: [[% FILTER replace('.');\n #\n # This is test3 from GD- 1.xx/t/GD.t \n #\n USE im = GD.Image(100,50);\n black = im.colorAllocate (0, 0, 0);\ n white = im.colorAllocate(255, 255, 255);\n red = im.colorAllocate(255, 0, 0);\n blue = im.colorAllocate(0,0,255);\n im.arc(50, 25, 98, 48, 0, 3 60, white);\n im.fill(50, 21, red);\nEND; -%][% im.png | hex -%]\n] expect: [89504e470d0a1a0a0000000d4948445200000064000000320203000000d75b962d0000\ n000c504c5445000000ffffffff00000000ff011d334a000000bc49444154789cad94c1 \n0d83300 c451309ba01cc93117a203d3002d3f4403680037fca8a448526f1b710ea3fe6 \nc9f9b163db984b6 ae4e3ce4755e7d64f88f2cf82787c151c0105eaf0ab708276ca0886 \n83bc7280d5919033a80c398 26c1502a4a4fa1a608d6414c8e6c865e9ba560298894d32 \n926c9291680338636580b742e4a7ed8 f7b10b2dc2272a27baafff5e1f9dca90eafb5f2 \n3ffc4f791ff0dee1fda6f428ef6b3e0bcafcf09 953e694cfb6b20f941da2ec1dbeaba2 \nb2fdf60111b64d2854ccf25e0000000049454e44ae42608 2] output: [89504e470d0a1a0a0000000d4948445200000064000000320203000000d75b962d0000\ n000c504c5445000000ffffffff00000000ff011d334a000000bc49444154388dad94c1 \n0d83300 c451309ba01cc93117a203d3002d3f4403680037fca8a448526f1b710ea3fe6 \nc9f9b163db984b6 ae4e3ce4755e7d64f88f2cf82787c151c0105eaf0ab708276ca0886 \n83bc7280d5919033a80c398 26c1502a4a4fa1a608d6414c8e6c865e9ba560298894d32 \n926c9291680338636580b742e4a7ed8 f7b10b2dc2272a27baafff5e1f9dca90eafb5f2 \n3ffc4f791ff0dee1fda6f428ef6b3e0bcafcf09 953e694cfb6b20f941da2ec1dbeaba2 \nb2fdf60111b64d28a110a5c20000000049454e44ae42608 2] FAILED 7: - template text 2 did not match expected not ok 7 - template text 2 did not match expected ok 8 - template text 3 processed OK: [% FILTER replace('.');\n #\n ... ok 9 - template text 3 matched expected ok 10 - template text 4 processed OK: [% FILTER replace('.');\n #\n ... ok 11 - template text 4 matched expected FAILED test 7 Failed 1/11 tests, 90.91% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------ ------- t/gd.t 11 1 9.09% 7 Failed 1/1 test scripts, 0.00% okay. 1/11 subtests failed, 90.91% okay. steve@kirk Template-Toolkit-2.14 # perl -v This is perl, v5.8.5 built for i686-linux Copyright 1987-2004, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page.
From: ville.skytta [...] iki.fi
Fails for me too in 2.14, same Perl version, Fedora Core 3, GD 2.19.
From: william [...] knowwmad.com
[SCOP - Sun Dec 26 14:35:22 2004]: Show quoted text
> Fails for me too in 2.14, same Perl version, Fedora Core 3, GD 2.19.
Ditto under Perl 5.8.6, Debian Sarge (kernel 2.4.26), GD v2.19, libgd2 v2.0.33, and TT v2.14. William
From: Matthew Miller
[SCOP - Sun Dec 26 14:35:22 2004]: Show quoted text
> Fails for me too in 2.14, same Perl version, Fedora Core 3, GD 2.19.
Yeah. Looks like the generated file varies by a few bytes. However, I opened each in the Gimp, and they _look_ identica.
Show quoted text
> Yeah. Looks like the generated file varies by a few bytes. However, I > opened each in the Gimp, and they _look_ identica.
I dug into the tests GD does itself, and it actually has a number of "valid" outputs it tests things against, and treats it as "ok" if the output matches any of the expected variants. Unfortunately the Template-Toolkit test setup does not provide similar facilities. Anyway, I updated the failing test to match another "known good" GD test output variant (see comments), and the test passes here now (GD 2.23, gd 2.0.28). See attached patch.
--- t/gd.t~ 2003-04-30 11:04:32.000000000 +0300 +++ t/gd.t 2005-03-14 02:49:02.956699022 +0200 @@ -84,7 +84,8 @@ -- test -- [% FILTER replace('.'); # - # This is test3 from GD-1.xx/t/GD.t + # This is test4 from GD-2.23/t/GD.t (note *.png-1): + # od -vAn -w35 -tx1 test.out.4.png-1 | tr -d ' ' # USE im = GD.Image(100,50); black = im.colorAllocate(0, 0, 0); @@ -96,13 +97,13 @@ END; -%][% im.png | hex -%] -- expect -- 89504e470d0a1a0a0000000d4948445200000064000000320203000000d75b962d0000 -000c504c5445000000ffffffff00000000ff011d334a000000bc49444154789cad94c1 +000c504c5445000000ffffffff00000000ff011d334a000000bc49444154388dad94c1 0d83300c451309ba01cc93117a203d3002d3f4403680037fca8a448526f1b710ea3fe6 c9f9b163db984b6ae4e3ce4755e7d64f88f2cf82787c151c0105eaf0ab708276ca0886 83bc7280d5919033a80c39826c1502a4a4fa1a608d6414c8e6c865e9ba560298894d32 926c9291680338636580b742e4a7ed8f7b10b2dc2272a27baafff5e1f9dca90eafb5f2 3ffc4f791ff0dee1fda6f428ef6b3e0bcafcf09953e694cfb6b20f941da2ec1dbeaba2 -b2fdf60111b64d2854ccf25e0000000049454e44ae426082 +b2fdf60111b64d28a110a5c20000000049454e44ae426082 -- test -- [% FILTER replace('.'); #