]>
Commit | Line | Data |
---|---|---|
37a9be8e TC |
1 | #!perl -w |
2 | use strict; | |
3 | use Imager qw(:all); | |
4 | use 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 | ||
9 | plan tests => 6; | |
10 | ||
11 | my $im = Imager->new; | |
4150ada4 | 12 | ok(!$im->read(file=>"testimg/test.png"), "should fail to read png"); |
37a9be8e TC |
13 | cmp_ok($im->errstr, '=~', "format 'png' not supported", "check no png message"); |
14 | $im = Imager->new(xsize=>2, ysize=>2); | |
15 | ok(!$im->write(file=>"testout/nopng.png"), "should fail to write png"); | |
16 | cmp_ok($im->errstr, '=~', "format 'png' not supported", "check no png message"); | |
17 | ok(!grep($_ eq 'png', Imager->read_types), "check png not in read types"); | |
18 | ok(!grep($_ eq 'png', Imager->write_types), "check png not in write types"); | |
19 |