File: tiny-pgm.t

package info (click to toggle)
libimage-info-perl 1.28-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 568 kB
  • ctags: 193
  • sloc: perl: 4,152; makefile: 46
file content (27 lines) | stat: -rw-r--r-- 524 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w

use Test::More;
use strict;

# test dim(), html_dim() and image_info()

BEGIN
   {
   plan tests => 4;
   chdir 't' if -d 't';
   use lib '../lib';
   use_ok ("Image::Info") or die($@);
   };

use Image::Info qw(image_info);

my $h = image_info("../img/tiny.pgm")
  || die ("Cannot read tiny.pgm: $!");

#use Data::Dumper; print STDERR "# ", Data::Dumper::Dumper($h), "\n";

is ($h->{file_media_type}, "image/pgm", 'file_media_type');

is ($h->{width}, 1, 'width=1');
is ($h->{height}, 1, 'height=1');;