Image-Info-1.20.tar.gz
[Image-Info.git] / t / tiny-pgm.t
blobb62254cb3cc3cff307043028b4bd4e32776a6146
1 #!/usr/bin/perl -w
3 use Test::More;
4 use strict;
6 # test dim(), html_dim() and image_info()
8 BEGIN
10 plan tests => 4;
11 chdir 't' if -d 't';
12 use lib '../lib';
13 use_ok ("Image::Info") or die($@);
16 use Image::Info qw(image_info);
18 my $h = image_info("../img/tiny.pgm")
19 || die ("Cannot read tiny.pgm: $!");
21 #use Data::Dumper; print STDERR "# ", Data::Dumper::Dumper($h), "\n";
23 is ($h->{file_media_type}, "image/pgm", 'file_media_type');
25 is ($h->{width}, 1, 'width=1');
26 is ($h->{height}, 1, 'height=1');;