]> git.imager.perl.org - imager.git/blob - t/t105nogif.t
update skip messages to match Imager's new threads support
[imager.git] / t / t105nogif.t
1 #!perl -w
2 use strict;
3 $|=1;
4 use Test::More;
5 use Imager qw(:all);
6
7 $Imager::formats{"gif"}
8   and plan skip_all => "gif support available and this tests the lack of it";
9
10 plan tests => 12;
11
12 my $im = Imager->new;
13 ok(!$im->read(file=>"GIF/testimg/scale.gif"), "should fail to read gif");
14 cmp_ok($im->errstr, '=~', "format 'gif' not supported",
15        "check no gif message");
16 ok(!Imager->read_multi(file=>"GIF/testimg/scale.gif"), 
17    "should fail to read multi gif");
18 cmp_ok($im->errstr, '=~', "format 'gif' not supported",
19        "check no gif message");
20
21 $im = Imager->new(xsize=>2, ysize=>2);
22
23 ok(!$im->write(file=>"testout/nogif.gif"), "should fail to write gif");
24 ok(!-e "testout/nogif.gif", "shouldn't create the file");
25 cmp_ok($im->errstr, '=~', "format 'gif' not supported",
26        "check no gif message");
27
28 ok(!Imager->write_multi({file => "testout/nogif.gif"}, $im, $im),
29    "should fail to write multi gif");
30 ok(!-e "testout/nogif.gif", "shouldn't create the file");
31 cmp_ok($im->errstr, '=~', "format 'gif' not supported",
32        "check no gif message");
33
34 ok(!grep($_ eq 'gif', Imager->read_types), "check gif not in read types");
35 ok(!grep($_ eq 'gif', Imager->write_types), "check gif not in write types");