]> git.imager.perl.org - imager.git/blob - t/t105nogif.t
re-work gif tests to move no gif available tests to a separate file
[imager.git] / t / t105nogif.t
1 #!perl -w
2 use strict;
3 $|=1;
4 use Test::More;
5 use Imager qw(:all);
6
7 i_has_format("gif")
8   and plan skip_all => "gif support available and this tests the lack of it";
9
10 plan tests => 6;
11
12 my $im = Imager->new;
13 ok(!$im->read(file=>"testimg/scale.gif"), "should fail to read gif");
14 cmp_ok($im->errstr, '=~', "format 'gif' not supported", "check no gif message");
15 $im = Imager->new(xsize=>2, ysize=>2);
16 ok(!$im->write(file=>"testout/nogif.gif"), "should fail to write gif");
17 cmp_ok($im->errstr, '=~', "format 'gif' not supported", "check no gif message");
18 ok(!grep($_ eq 'gif', Imager->read_types), "check gif not in read types");
19 ok(!grep($_ eq 'gif', Imager->write_types), "check gif not in write types");