File: t60dyntest.t

package info (click to toggle)
libimager-perl 0.75-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,532 kB
  • ctags: 3,278
  • sloc: ansic: 24,109; perl: 21,732; makefile: 13
file content (31 lines) | stat: -rw-r--r-- 757 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
28
29
30
31
#!perl -w
use strict;
use lib '../t';
use Test::More tests => 4;
BEGIN { use_ok(Imager => qw(:default)); }
use Config;

#$Imager::DEBUG=1;

Imager::init('log'=>'../testout/t60dyntest.log');

my $img=Imager->new() || die "unable to create image object\n";

$img->read(file=>'../testimg/penguin-base.ppm',type=>'pnm') 
  || die "failed: ",$img->{ERRSTR},"\n";

my $plug='./dyntest.'.$Config{'so'};
ok(load_plugin($plug), "load plugin")
  || die "unable to load plugin: $Imager::ERRSTR\n";

my %hsh=(a=>35,b=>200,type=>'lin_stretch');
ok($img->filter(%hsh), "call filter");

$img->write(type=>'pnm',file=>'../testout/t60.ppm') 
  || die "error in write()\n";

ok(unload_plugin($plug), "unload plugin")
  || die "unable to unload plugin: $Imager::ERRSTR\n";