]> git.imager.perl.org - imager.git/blobdiff - t/t99thread.t
improve test coverage of Imager::Fountain
[imager.git] / t / t99thread.t
index d7fe820ffb012f879386e554c8a66a3ca184f32c..85a9e95bfd7f96cbf9658b07c9a10920e8bdf4c5 100644 (file)
@@ -4,16 +4,28 @@ use Imager;
 use Imager::Color::Float;
 use Imager::Fill;
 use Config;
+my $loaded_threads;
 BEGIN {
-  if ($Config{useithreads}) {
-    require threads;
-    threads->import;
+  if ($Config{useithreads} && $] > 5.008007) {
+    $loaded_threads =
+      eval {
+       require threads;
+       threads->import;
+       1;
+      };
   }
 }
 use Test::More;
 
 $Config{useithreads}
   or plan skip_all => "can't test Imager's lack of threads support with no threads";
+$] > 5.008007
+  or plan skip_all => "require a perl with CLONE_SKIP to test Imager's lack of threads support";
+$loaded_threads
+  or plan skip_all => "couldn't load threads";
+
+$INC{"Devel/Cover.pm"}
+  and plan skip_all => "threads and Devel::Cover don't get along";
 
 plan tests => 11;