]> git.imager.perl.org - imager.git/blob - t/t70newgif.t
forgot to change this one after fixing t105gif.t
[imager.git] / t / t70newgif.t
1 # Before `make install' is performed this script should be runnable with
2 # `make test'. After `make install' it should work as `perl test.pl'
3
4 ######################### We start with some black magic to print on failure.
5
6 # Change 1..1 below to 1..last_test_to_print .
7 # (It may become useful if the test is moved to ./t subdirectory.)
8
9
10 BEGIN { $| = 1; print "1..3\n"; }
11 END {print "not ok 1\n" unless $loaded;}
12
13 use Imager;
14 $loaded=1;
15
16 print "ok 1\n";
17
18 Imager::init('log'=>'testout/t70newgif.log');
19
20 $green=i_color_new(0,255,0,0);
21 $blue=i_color_new(0,0,255,0);
22
23 $img=Imager->new();
24 $img->open(file=>'testimg/scale.ppm',type=>'pnm') || print "failed: ",$img->{ERRSTR},"\n";
25 print "ok 2\n";
26
27
28 $img->write(file=>'testout/t70newgif.gif',type=>'gif',gifplanes=>1,gifquant=>'lm',lmfixed=>[$green,$blue]) || print "failed: ",$img->{ERRSTR},"\n";
29 print "ok 3\n";
30
31
32
33
34
35
36
37
38
39
40