#!perl -w
use Imager ':all';
-require "t/testtools.pl";
+BEGIN { require "t/testtools.pl"; }
use strict;
-print "1..43\n";
+print "1..45\n";
init_log("testout/t104ppm.log",1);
check_color(43, $green, 127, 127, 0, "green 4095 pixel");
}
+my $num = 44;
+{ # check i_format is set when reading a pnm file
+ # doesn't really matter which file.
+ my $maxval = Imager->new;
+ okn($num++, $maxval->read(file=>"testimg/maxval.ppm"),
+ "read test file");
+ my ($type) = $maxval->tags(name=>'i_format');
+ isn($num++, $type, 'pnm', "check i_format");
+}
+
sub openimage {
my $fname = shift;
local(*FH);