r20221 - in /branches/upstream/libimager-perl/current: ./ ICO/t/ lib/Imager/ t/
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Tue May 20 16:48:26 UTC 2008
Author: gregoa
Date: Tue May 20 16:48:26 2008
New Revision: 20221
URL: http://svn.debian.org/wsvn/?sc=1&rev=20221
Log:
[svn-upgrade] Integrating new upstream version, libimager-perl (0.65)
Removed:
branches/upstream/libimager-perl/current/t/testtools.pl
Modified:
branches/upstream/libimager-perl/current/Changes
branches/upstream/libimager-perl/current/ICO/t/t70icosing.t
branches/upstream/libimager-perl/current/ICO/t/t71icomult.t
branches/upstream/libimager-perl/current/ICO/t/t72cursing.t
branches/upstream/libimager-perl/current/ICO/t/t73curmult.t
branches/upstream/libimager-perl/current/Imager.pm
branches/upstream/libimager-perl/current/MANIFEST
branches/upstream/libimager-perl/current/META.yml
branches/upstream/libimager-perl/current/gif.c
branches/upstream/libimager-perl/current/io.c
branches/upstream/libimager-perl/current/jpeg.c
branches/upstream/libimager-perl/current/lib/Imager/Test.pm
branches/upstream/libimager-perl/current/t/t01introvert.t
branches/upstream/libimager-perl/current/t/t022double.t
branches/upstream/libimager-perl/current/t/t102png.t
branches/upstream/libimager-perl/current/t/t105gif.t
branches/upstream/libimager-perl/current/t/t35ttfont.t
branches/upstream/libimager-perl/current/t/t40scale.t
branches/upstream/libimager-perl/current/t/t65crop.t
Modified: branches/upstream/libimager-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/Changes?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/Changes (original)
+++ branches/upstream/libimager-perl/current/Changes Tue May 20 16:48:26 2008
@@ -1,4 +1,20 @@
Imager release history. Older releases can be found in Changes.old
+
+Imager 0.65 - unreleased
+===========
+
+Bug fixes:
+
+ - In some cases when an error occurs reading those parts of a JPEG
+ file after the image the scan-line buffer could be freed a second
+ time. In cases where the the error occured while reading the image
+ data it's possible that the buffer could have leaked.
+ Thanks to Gabriel Vasseur for reporting this and help in tracking
+ it down.
+
+ - the gif_screen_height tag was overriding the screen width and being
+ ignored for the screen height when present.
+ https://rt.cpan.org/Public/Bug/Display.html?id=35568
Imager 0.64 - 23 April 2008
===========
@@ -12,6 +28,7 @@
based fills had a buffer overflow. This would overwrite the end of
a malloc()ed buffer with double precision floats.
http://rt.cpan.org/Ticket/Display.html?id=35324
+ CVE-2008-1928
- check that the result of fileno($fh) is defined rather than simply
true when read() or write() is supplied with an fh parameter.
Modified: branches/upstream/libimager-perl/current/ICO/t/t70icosing.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/ICO/t/t70icosing.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/ICO/t/t70icosing.t (original)
+++ branches/upstream/libimager-perl/current/ICO/t/t70icosing.t Tue May 20 16:48:26 2008
@@ -2,10 +2,10 @@
use strict;
use Test::More tests => 1;
use Imager;
-require '../t/testtools.pl';
+use Imager::Test qw(test_image);
# checks that we load the ICO write handler automatically
-my $img = test_oo_img();
+my $img = test_image();
ok($img->write(file => 'testout/icosing.ico'),
"write ico with autoload")
or print "# ",$img->errstr,"\n";
Modified: branches/upstream/libimager-perl/current/ICO/t/t71icomult.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/ICO/t/t71icomult.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/ICO/t/t71icomult.t (original)
+++ branches/upstream/libimager-perl/current/ICO/t/t71icomult.t Tue May 20 16:48:26 2008
@@ -2,10 +2,10 @@
use strict;
use Test::More tests => 1;
use Imager;
-require '../t/testtools.pl';
+use Imager::Test qw(test_image);
# checks that we load the ICO write handler automatically
-my $img = test_oo_img();
+my $img = test_image();
ok(Imager->write_multi({ file => 'testout/icomult.ico' }, $img, $img),
"write_multi ico with autoload")
or print "# ",Imager->errstr,"\n";
Modified: branches/upstream/libimager-perl/current/ICO/t/t72cursing.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/ICO/t/t72cursing.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/ICO/t/t72cursing.t (original)
+++ branches/upstream/libimager-perl/current/ICO/t/t72cursing.t Tue May 20 16:48:26 2008
@@ -2,10 +2,10 @@
use strict;
use Test::More tests => 1;
use Imager;
-require '../t/testtools.pl';
+use Imager::Test qw(test_image);
# checks that we load the CUR write handler automatically
-my $img = test_oo_img();
+my $img = test_image();
ok($img->write(file => 'testout/cursing.cur'),
"write cur with autoload")
or print "# ",$img->errstr,"\n";
Modified: branches/upstream/libimager-perl/current/ICO/t/t73curmult.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/ICO/t/t73curmult.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/ICO/t/t73curmult.t (original)
+++ branches/upstream/libimager-perl/current/ICO/t/t73curmult.t Tue May 20 16:48:26 2008
@@ -2,10 +2,10 @@
use strict;
use Test::More tests => 1;
use Imager;
-require '../t/testtools.pl';
+use Imager::Test qw(test_image);
# checks that we load the CUR write handler automatically
-my $img = test_oo_img();
+my $img = test_image();
ok(Imager->write_multi({ file => 'testout/icomult.cur' }, $img, $img),
"write_multi cur with autoload")
or print "# ",Imager->errstr,"\n";
Modified: branches/upstream/libimager-perl/current/Imager.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/Imager.pm?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/Imager.pm (original)
+++ branches/upstream/libimager-perl/current/Imager.pm Tue May 20 16:48:26 2008
@@ -173,7 +173,7 @@
BEGIN {
require Exporter;
@ISA = qw(Exporter);
- $VERSION = '0.64';
+ $VERSION = '0.65';
eval {
require XSLoader;
XSLoader::load(Imager => $VERSION);
Modified: branches/upstream/libimager-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/MANIFEST?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/MANIFEST (original)
+++ branches/upstream/libimager-perl/current/MANIFEST Tue May 20 16:48:26 2008
@@ -273,7 +273,6 @@
t/t92samples.t
t/t93podcover.t POD Coverage tests
t/t94kwalitee.t Various "kwalitee" tests
-t/testtools.pl
t/tr18561.t Regression tests
t/tr18561b.t
tags.c
Modified: branches/upstream/libimager-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/META.yml?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/META.yml (original)
+++ branches/upstream/libimager-perl/current/META.yml Tue May 20 16:48:26 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Imager
-version: 0.64
+version: 0.65
version_from: Imager.pm
author:
- Tony Cook <tony at imager.perl.org>
@@ -17,4 +17,4 @@
meta-spec:
version: 1.3
url: http://module-build.sourceforge.net/META-spec-v1.3.html
-generated_by: Imager version 0.64
+generated_by: Imager version 0.65
Modified: branches/upstream/libimager-perl/current/gif.c
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/gif.c?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/gif.c (original)
+++ branches/upstream/libimager-perl/current/gif.c Tue May 20 16:48:26 2008
@@ -1733,7 +1733,7 @@
if (!i_tags_get_int(&imgs[0]->tags, "gif_screen_width", 0, &scrw))
scrw = 0;
- if (!i_tags_get_int(&imgs[0]->tags, "gif_screen_height", 0, &scrw))
+ if (!i_tags_get_int(&imgs[0]->tags, "gif_screen_height", 0, &scrh))
scrw = 0;
anylocal = 0;
Modified: branches/upstream/libimager-perl/current/io.c
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/io.c?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/io.c (original)
+++ branches/upstream/libimager-perl/current/io.c Tue May 20 16:48:26 2008
@@ -190,6 +190,9 @@
char *pp = p;
int match = 0;
int i;
+
+ if (p == NULL)
+ return;
for(i=0; i<MAXMAL; i++) if (malloc_pointers[i].ptr == p) {
mm_log((1,"myfree_file_line: pointer %i (%s) freed at %s (%i)\n", i, malloc_pointers[i].comm, file, line));
Modified: branches/upstream/libimager-perl/current/jpeg.c
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/jpeg.c?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/jpeg.c (original)
+++ branches/upstream/libimager-perl/current/jpeg.c Tue May 20 16:48:26 2008
@@ -387,7 +387,7 @@
#ifdef IMEXIF_ENABLE
int seen_exif = 0;
#endif
- i_color *line_buffer = NULL;
+ i_color * volatile line_buffer = NULL;
struct jpeg_decompress_struct cinfo;
struct my_error_mgr jerr;
JSAMPARRAY buffer; /* Output row buffer */
@@ -504,6 +504,7 @@
i_plin(im, 0, cinfo.output_width, cinfo.output_scanline-1, line_buffer);
}
myfree(line_buffer);
+ line_buffer = NULL;
/* check for APP1 marker and save */
markerp = cinfo.marker_list;
Modified: branches/upstream/libimager-perl/current/lib/Imager/Test.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/lib/Imager/Test.pm?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/lib/Imager/Test.pm (original)
+++ branches/upstream/libimager-perl/current/lib/Imager/Test.pm Tue May 20 16:48:26 2008
@@ -4,13 +4,26 @@
require Exporter;
use vars qw(@ISA @EXPORT_OK);
@ISA = qw(Exporter);
- at EXPORT_OK = qw(diff_text_with_nul
- test_image_raw test_image_16 test_image test_image_double
- is_color3 is_color1 is_color4 is_color_close3
- is_fcolor4
- is_image is_image_similar
- image_bounds_checks mask_tests
- test_colorf_gpix test_color_gpix test_colorf_glin);
+ at EXPORT_OK =
+ qw(
+ diff_text_with_nul
+ test_image_raw
+ test_image_16
+ test_image
+ test_image_double
+ is_color1
+ is_color3
+ is_color4
+ is_color_close3
+ is_fcolor4
+ color_cmp
+ is_image
+ is_image_similar
+ image_bounds_checks
+ mask_tests
+ test_colorf_gpix
+ test_color_gpix
+ test_colorf_glin);
sub diff_text_with_nul {
my ($desc, $text1, $text2, @params) = @_;
@@ -363,11 +376,14 @@
$builder->ok(0, "$comment - retrieve color at ($x,$y)");
return;
}
- unless ($builder->ok(_colorf_cmp($c, $expected, $epsilon) == 0,
+ unless ($builder->ok(colorf_cmp($c, $expected, $epsilon) == 0,
"$comment - got right color ($x, $y)")) {
- print "# got: (", join(",", ($c->rgba)[0,1,2]), ")\n";
- print "# expected: (", join(",", ($expected->rgba)[0,1,2]), ")\n";
- return;
+ my @c = $c->rgba;
+ my @exp = $expected->rgba;
+ $builder->diag(<<EOS);
+# got: ($c[0], $c[1], $c[2])
+# expected: ($exp[0], $exp[1], $exp[2])
+EOS
}
1;
}
@@ -383,10 +399,14 @@
$builder->ok(0, "$comment - retrieve color at ($x,$y)");
return;
}
- unless ($builder->ok(_color_cmp($c, $expected) == 0,
+ unless ($builder->ok(color_cmp($c, $expected) == 0,
"got right color ($x, $y)")) {
- print "# got: (", join(",", ($c->rgba)[0,1,2]), ")\n";
- print "# expected: (", join(",", ($expected->rgba)[0,1,2]), ")\n";
+ my @c = $c->rgba;
+ my @exp = $expected->rgba;
+ $builder->diag(<<EOS);
+# got: ($c[0], $c[1], $c[2])
+# expected: ($exp[0], $exp[1], $exp[2])
+EOS
return;
}
@@ -402,11 +422,11 @@
@got == @$pels
or return $builder->is_num(scalar(@got), scalar(@$pels), "$comment - pixels retrieved");
- return $builder->ok(!grep(_colorf_cmp($pels->[$_], $got[$_], 0.005), 0..$#got),
+ return $builder->ok(!grep(colorf_cmp($pels->[$_], $got[$_], 0.005), 0..$#got),
"$comment - check colors ($x, $y)");
}
-sub _colorf_cmp {
+sub colorf_cmp {
my ($c1, $c2, $epsilon) = @_;
defined $epsilon or $epsilon = 0;
@@ -420,7 +440,7 @@
|| abs($s1[2]-$s2[2]) >= $epsilon && $s1[2] <=> $s2[2];
}
-sub _color_cmp {
+sub color_cmp {
my ($c1, $c2) = @_;
my @s1 = $c1->rgba;
Modified: branches/upstream/libimager-perl/current/t/t01introvert.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t01introvert.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t01introvert.t (original)
+++ branches/upstream/libimager-perl/current/t/t01introvert.t Tue May 20 16:48:26 2008
@@ -3,13 +3,11 @@
# to make sure we get expected values
use strict;
-use Test::More tests => 228;
+use Test::More tests => 220;
BEGIN { use_ok(Imager => qw(:handy :all)) }
-require "t/testtools.pl";
-
-use Imager::Test qw(image_bounds_checks is_color4 is_fcolor4);
+use Imager::Test qw(image_bounds_checks is_color3 is_color4 is_fcolor4 color_cmp mask_tests);
init_log("testout/t01introvert.log",1);
@@ -82,10 +80,10 @@
# reading indicies as colors
my $c_red = Imager::i_get_pixel($im_pal, 0, 0);
ok($c_red, "got the red pixel");
-ok(color_cmp($red, $c_red) == 0, "and it's red");
+is_color3($c_red, 255, 0, 0, "and it's red");
my $c_blue = Imager::i_get_pixel($im_pal, 50, 0);
ok($c_blue, "got the blue pixel");
-ok(color_cmp($blue, $c_blue) == 0, "and it's blue");
+is_color3($c_blue, 0, 0, 255, "and it's blue");
# drawing with colors
ok(Imager::i_ppix($im_pal, 0, 0, $green) == 0, "draw with color in palette");
@@ -94,7 +92,7 @@
my $c_green = Imager::i_get_pixel($im_pal, 0, 0);
ok($c_green, "got green pixel");
-ok(color_cmp($green, $c_green) == 0, "and it's green");
+is_color3($c_green, 0, 255, 0, "and it's green");
is(Imager::i_colorcount($im_pal), 3, "still 3 colors in palette");
is(Imager::i_findcolor($im_pal, $green), 1, "and green is the second");
@@ -132,7 +130,7 @@
is($blue_idx, 1, "and it's expected index for blue");
my $green_idx = $blue_idx + 1;
my $c = $impal2->getcolors(start=>$green_idx);
- ok(color_cmp($green, $c) == 0, "found green where expected");
+ is_color3($c, 0, 255, 0, "found green where expected");
my @cols = $impal2->getcolors;
is(@cols, 3, "got 3 colors");
my @exp = ( $red, $blue, $green );
@@ -267,8 +265,8 @@
my @row = Imager::i_glin($im->{IMG}, 0, 2, 0);
is(@row, 2, "got 2 pixels from i_glin");
- ok(color_cmp($row[0], $red) == 0, "red first");
- ok(color_cmp($row[1], $blue) == 0, "then blue");
+ is_color3($row[0], 255, 0, 0, "red first");
+ is_color3($row[1], 0, 0, 255, "then blue");
}
{ # general tag tests
Modified: branches/upstream/libimager-perl/current/t/t022double.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t022double.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t022double.t (original)
+++ branches/upstream/libimager-perl/current/t/t022double.t Tue May 20 16:48:26 2008
@@ -1,13 +1,12 @@
#!perl -w
use strict;
-use Test::More tests => 98;
+use Test::More tests => 83;
BEGIN { use_ok(Imager => qw(:all :handy)) }
-require "t/testtools.pl";
init_log("testout/t022double.log", 1);
-use Imager::Test qw(image_bounds_checks);
+use Imager::Test qw(image_bounds_checks test_colorf_gpix test_colorf_glin mask_tests);
use Imager::Color::Float;
@@ -53,12 +52,13 @@
test_colorf_gpix($im_rgb, 99, 0, $redf);
test_colorf_gpix($im_rgb, 0, 100, $redf);
test_colorf_gpix($im_rgb, 99, 100, $redf);
-test_colorf_glin($im_rgb, 0, 0, ($redf) x 100);
-test_colorf_glin($im_rgb, 0, 100, ($redf) x 100);
+test_colorf_glin($im_rgb, 0, 0, [ ($redf) x 100 ], 'sanity glin @0');
+test_colorf_glin($im_rgb, 0, 100, [ ($redf) x 100 ], 'sanity glin @100');
Imager::i_plinf($im_rgb, 20, 1, ($greenf) x 60);
test_colorf_glin($im_rgb, 0, 1,
- ($redf) x 20, ($greenf) x 60, ($redf) x 20);
+ [ ($redf) x 20, ($greenf) x 60, ($redf) x 20 ],
+ 'check after write');
# basic OO tests
my $ooimg = Imager->new(xsize=>200, ysize=>201, bits=>'double');
Modified: branches/upstream/libimager-perl/current/t/t102png.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t102png.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t102png.t (original)
+++ branches/upstream/libimager-perl/current/t/t102png.t Tue May 20 16:48:26 2008
@@ -10,7 +10,6 @@
# (It may become useful if the test is moved to ./t subdirectory.)
use lib qw(blib/lib blib/arch);
-BEGIN { require 't/testtools.pl'; }
BEGIN { use_ok('Imager', ':all') }
init_log("testout/t102png.log",1);
Modified: branches/upstream/libimager-perl/current/t/t105gif.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t105gif.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t105gif.t (original)
+++ branches/upstream/libimager-perl/current/t/t105gif.t Tue May 20 16:48:26 2008
@@ -12,10 +12,10 @@
use strict;
$|=1;
-use Test::More tests => 132;
+use Test::More tests => 140;
use Imager qw(:all);
use Imager::Test qw(is_color3);
-BEGIN { require "t/testtools.pl"; }
+
use Carp 'confess';
$SIG{__DIE__} = sub { confess @_ };
@@ -51,7 +51,7 @@
cmp_ok($im->errstr, '=~', "format 'gif' not supported", "check no gif message");
ok(!grep($_ eq 'gif', Imager->read_types), "check gif not in read types");
ok(!grep($_ eq 'gif', Imager->write_types), "check gif not in write types");
- skip("no gif support", 126);
+ skip("no gif support", 134);
}
open(FH,">testout/t105.gif") || die "Cannot open testout/t105.gif\n";
binmode(FH);
@@ -186,9 +186,9 @@
skip("giflib3 doesn't support callbacks", 1) unless $gifver >= 4.0;
++$can_write_callback;
my $good = ext_test(14, <<'ENDOFCODE');
-use Imager;
-require "t/testtools.pl";
-my $timg = test_img();
+use Imager qw(:all);
+use Imager::Test qw(test_image_raw);
+my $timg = test_image_raw();
my @gif_delays = (50) x 5;
my @gif_disposal = (2) x 5;
my @imgs = ($timg) x 5;
@@ -711,6 +711,37 @@
ok(grep($_ eq 'gif', Imager->read_types), "check gif in read types");
ok(grep($_ eq 'gif', Imager->write_types), "check gif in write types");
}
+
+ {
+ # check screen tags handled correctly note the screen size
+ # supplied is larger than the box covered by the images
+ my $im1 = Imager->new(xsize => 10, ysize => 8);
+ $im1->settag(name => 'gif_top', value => 4);
+ $im1->settag(name => 'gif_screen_width', value => 18);
+ $im1->settag(name => 'gif_screen_height', value => 16);
+ my $im2 = Imager->new(xsize => 7, ysize => 10);
+ $im2->settag(name => 'gif_left', value => 3);
+ my @im = ( $im1, $im2 );
+
+ my $data;
+ ok(Imager->write_multi({ data => \$data, type => 'gif' }, @im),
+ "write with screen settings")
+ or print "# ", Imager->errstr, "\n";
+ my @result = Imager->read_multi(data => $data);
+ is(@result, 2, "got 2 images back");
+ is($result[0]->tags(name => 'gif_screen_width'), 18,
+ "check result screen width");
+ is($result[0]->tags(name => 'gif_screen_height'), 16,
+ "check result screen height");
+ is($result[0]->tags(name => 'gif_left'), 0,
+ "check first gif_left");
+ is($result[0]->tags(name => 'gif_top'), 4,
+ "check first gif_top");
+ is($result[1]->tags(name => 'gif_left'), 3,
+ "check second gif_left");
+ is($result[1]->tags(name => 'gif_top'), 0,
+ "check second gif_top");
+ }
}
sub test_readgif_cb {
Modified: branches/upstream/libimager-perl/current/t/t35ttfont.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t35ttfont.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t35ttfont.t (original)
+++ branches/upstream/libimager-perl/current/t/t35ttfont.t Tue May 20 16:48:26 2008
@@ -1,18 +1,17 @@
#!perl -w
use strict;
-use Test::More tests => 91;
+use Test::More tests => 92;
$|=1;
BEGIN { use_ok(Imager => ':all') }
-require "t/testtools.pl";
use Imager::Test qw(diff_text_with_nul is_color3);
init_log("testout/t35ttfont.log",2);
SKIP:
{
- skip("freetype 1.x unavailable or disabled", 90)
+ skip("freetype 1.x unavailable or disabled", 91)
unless i_has_format("tt");
print "# has tt\n";
@@ -276,16 +275,19 @@
# UTF8 encoded \x{2010}
my $dash = pack("C*", 0xE2, 0x80, 0x90);
- diff_text_with_nul("utf8 dash\0dash vs dash", "$dash\0$dash", $dash,
+ diff_text_with_nul("utf8 dash\\0dash vs dash", "$dash\0$dash", $dash,
font => $font, color => '#FFFFFF', utf8 => 1);
- diff_text_with_nul("utf8 dash\0dash vs dash", "$dash\0$dash", $dash,
+ diff_text_with_nul("utf8 dash\\0dash vs dash", "$dash\0$dash", $dash,
font => $font, channel => 1, utf8 => 1);
}
+ SKIP:
{ # RT 11972
# when rendering to a transparent image the coverage should be
# expressed in terms of the alpha channel rather than the color
my $font = Imager::Font->new(file=>'fontfiles/ImUgly.ttf', type=>'tt');
+ ok($font, "loaded fontfiles/ImUgly.ttf")
+ or skip("Could not load test font: ".Imager->errstr, 4);
my $im = Imager->new(xsize => 40, ysize => 20, channels => 4);
ok($im->string(string => "AB", size => 20, aa => 1, color => '#F00',
x => 0, y => 15, font => $font),
Modified: branches/upstream/libimager-perl/current/t/t40scale.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t40scale.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t40scale.t (original)
+++ branches/upstream/libimager-perl/current/t/t40scale.t Tue May 20 16:48:26 2008
@@ -4,8 +4,6 @@
BEGIN { use_ok(Imager=>':all') }
use Imager::Test qw(is_image is_color4);
-
-#require "t/testtools.pl";
Imager::init('log'=>'testout/t40scale.log');
my $img=Imager->new();
Modified: branches/upstream/libimager-perl/current/t/t65crop.t
URL: http://svn.debian.org/wsvn/branches/upstream/libimager-perl/current/t/t65crop.t?rev=20221&op=diff
==============================================================================
--- branches/upstream/libimager-perl/current/t/t65crop.t (original)
+++ branches/upstream/libimager-perl/current/t/t65crop.t Tue May 20 16:48:26 2008
@@ -1,8 +1,8 @@
#!perl -w
use strict;
use Test::More tests => 64;
-require "t/testtools.pl";
use Imager;
+use Imager::Test qw(test_image);
#$Imager::DEBUG=1;
@@ -46,7 +46,7 @@
# the left of the image, even if left/top are provided, despite the
# sample in the docs
# Let's make sure that things happen as documented
- my $src = test_oo_img();
+ my $src = test_image();
# make sure we get what we want
is($src->getwidth, 150, "src width");
is($src->getheight, 150, "src height");
@@ -146,7 +146,7 @@
{ # https://rt.cpan.org/Ticket/Display.html?id=7581
# previously we didn't check that the result had some pixels
# make sure we do
- my $src = test_oo_img();
+ my $src = test_image();
ok(!$src->crop(left=>50, right=>50), "nothing across");
cmp_ok($src->errstr, '=~', qr/resulting image would have no content/,
"and message");
@@ -172,7 +172,7 @@
}
{
- my $src = test_oo_img();
+ my $src = test_image();
ok(!$src->crop( top=>1000, bottom=>1500, left=>0, right=>100 ),
"outside of image" );
cmp_ok($src->errstr, '=~', qr/outside of the image/, "and message");
More information about the Pkg-perl-cvs-commits
mailing list