1 BEGIN { $|=1; print "1..2\n"; }
2 END { print "not ok 1\n" unless $loaded; };
6 init_log("testout/t05error.log", 1);
8 # try to read an invalid pnm file
9 open FH, "< testimg/junk.ppm"
10 or die "Cannot open testin/junk: $!";
12 my $IO = Imager::io_new_fd(fileno(FH));
13 my $im = i_readpnm_wiol($IO, -1);
15 print "not ok 2 # read of junk.ppm should have failed\n";
18 my @errors = Imager::i_errors();
20 print "not ok 2 # no errors from i_errors()\n";
23 # each entry must be an array ref with 2 elements
28 print "not ok 2 # element not an array ref\n";
32 print "not ok 2 # elements array didn't have 2 elements\n";
40 print "# $_->[0]/$_->[1]\n";