]> git.imager.perl.org - imager.git/blame - t/t102nopng.t
add the context slot APIs
[imager.git] / t / t102nopng.t
CommitLineData
37a9be8e
TC
1#!perl -w
2use strict;
3use Imager qw(:all);
4use Test::More;
5
1d7e3124 6$Imager::formats{"png"}
37a9be8e
TC
7 and plan skip_all => "png available, and this tests the lack of it";
8
9plan tests => 6;
10
11my $im = Imager->new;
4150ada4 12ok(!$im->read(file=>"testimg/test.png"), "should fail to read png");
37a9be8e
TC
13cmp_ok($im->errstr, '=~', "format 'png' not supported", "check no png message");
14$im = Imager->new(xsize=>2, ysize=>2);
15ok(!$im->write(file=>"testout/nopng.png"), "should fail to write png");
16cmp_ok($im->errstr, '=~', "format 'png' not supported", "check no png message");
17ok(!grep($_ eq 'png', Imager->read_types), "check png not in read types");
18ok(!grep($_ eq 'png', Imager->write_types), "check png not in write types");
19