-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";
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";
+}