File: dim.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-- 537 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 => 5;
   chdir 't' if -d 't';
   use lib '../lib';
   use_ok ("Image::Info") or die($@);
   };

use Image::Info qw(image_info dim html_dim);

my $info = image_info("../img/test.gif");
my @dim = dim($info);

is (join(" ", @dim), "200 150", 'dim()');

is (dim($info), '200x150', 'dim($info)');

is (html_dim($info), 'width="200" height="150"', 'html_dim()');

is (html_dim(image_info('README')), '', 'no README in info');