]> git.imager.perl.org - imager.git/blobdiff - t/t101nojpeg.t
skip t/x30podlinkcheck.t if Pod::Parser 1.50 not available
[imager.git] / t / t101nojpeg.t
index 5f47a80ac61884907a2c12f8b3ce8fb9359331ff..582d5bfdb4079f369eed3eb9dfda77b7e72a9a0c 100644 (file)
@@ -5,7 +5,7 @@ use Imager qw(:all);
 
 -d "testout" or mkdir "testout";
 
-init_log("testout/t101jpeg.log",1);
+Imager->open_log(log => "testout/t101jpeg.log");
 
 $Imager::formats{"jpeg"}
   and plan skip_all => "have jpeg support - this tests the lack of it";
@@ -20,3 +20,9 @@ ok(!$im->write(file=>"testout/nojpeg.jpg"), "should fail to write jpeg");
 cmp_ok($im->errstr, '=~', qr/format 'jpeg' not supported/, "check no jpeg message");
 ok(!grep($_ eq 'jpeg', Imager->read_types), "check jpeg not in read types");
 ok(!grep($_ eq 'jpeg', Imager->write_types), "check jpeg not in write types");
+
+Imager->close_log;
+
+unless ($ENV{IMAGER_KEEP_FILES}) {
+  unlink "testout/t101jpeg.log";
+}