]> git.imager.perl.org - imager.git/blame - t/t106notiff.t
add an unshipped test for checking sub-module versions are updated
[imager.git] / t / t106notiff.t
CommitLineData
e83b349b
TC
1#!perl -w
2use strict;
3use Test::More;
4use Imager qw(:all);
5
e5ee047b 6$Imager::formats{"tiff"}
e83b349b
TC
7 and plan skip_all => "tiff support available - this tests the lack of it";
8
8d46e5da 9plan tests => 12;
e83b349b
TC
10
11my $im = Imager->new;
8d46e5da 12
e85532b9 13ok(!$im->read(file=>"TIFF/testimg/comp4.tif"), "should fail to read tif");
8d46e5da
TC
14cmp_ok($im->errstr, '=~', "format 'tiff' not supported",
15 "check no tiff message");
16
e85532b9 17ok(!$im->read_multi(file => "TIFF/testimg/comp4.tif"),
8d46e5da
TC
18 "should fail to read multi tiff");
19cmp_ok($im->errstr, '=~', "format 'tiff' not supported",
20 "check no tiff message");
21
e83b349b 22$im = Imager->new(xsize=>2, ysize=>2);
8d46e5da 23
e83b349b 24ok(!$im->write(file=>"testout/notiff.tif"), "should fail to write tiff");
8d46e5da
TC
25cmp_ok($im->errstr, '=~', "format 'tiff' not supported",
26 "check no tiff message");
27ok(!-e "testout/notiff.tif", "file shouldn't be created");
28
29ok(!Imager->write_multi({file=>"testout/notiff.tif"}, $im, $im),
30 "should fail to write multi tiff");
31cmp_ok($im->errstr, '=~', "format 'tiff' not supported",
32 "check no tiff message");
33ok(!-e "testout/notiff.tif", "file shouldn't be created");
34
e83b349b
TC
35ok(!grep($_ eq 'tiff', Imager->read_types), "check tiff not in read types");
36ok(!grep($_ eq 'tiff', Imager->write_types), "check tiff not in write types");