directory tests
http://rt.cpan.org/Ticket/Display.html?id=30203
+ - Imager::Font::Wrap doesn't correctly set savepos
+ thanks to Nikita Dedik and Eleneldil G. Arilou for reporting this.
+ http://rt.cpan.org/Ticket/Display.html?id=29771
+
Imager 0.60 - 30 August 2007
===========
dynfilt/t/t60dyntest.t relies on a file that may not exist (#30203)
(done)
+Imager::Font::Wrap doesn't correctly set savepos (#29771) (done)
+
For 0.60 (hopefully):
RGB file support (#8666) (done)
}
if (length $line && !$state{full}) {
- _format_line(\%state, 0, $line, 0);
+ $linepos += length $line
+ if _format_line(\%state, 0, $line, 0);
}
if ($input{savepos}) {
#!perl -w
use strict;
-use Test::More tests => 11;
+use Test::More tests => 13;
BEGIN { use_ok('Imager') }
SKIP:
{
Imager::i_has_format('tt') || Imager::i_has_format('ft2')
- or skip("Need Freetype 1.x or 2.x to test", 9);
+ or skip("Need Freetype 1.x or 2.x to test", 11);
ok($font, "loading font")
or skip("Could not load test font", 8);
ok(@box == 4, "bounds list count");
print "# @box\n";
ok($box[3] == $bbox->font_height, "check height");
+
+ { # regression
+ # http://rt.cpan.org/Ticket/Display.html?id=29771
+ # the length of the trailing line wasn't included in the text consumed
+ my $used;
+ ok(scalar Imager::Font::Wrap->wrap_text
+ ( string => "test", font => $font, image => undef, size => 12,
+ width => 200, savepos => \$used, height => $bbox->font_height),
+ "regression 29771 - call wrap_text");
+ is($used, 4, "all text should be consumed");
+ }
}