]> git.imager.perl.org - imager.git/commitdiff
make sure we have alarm() support
authorTony Cook <tony@develop=help.com>
Sun, 31 Mar 2002 02:09:37 +0000 (02:09 +0000)
committerTony Cook <tony@develop=help.com>
Sun, 31 Mar 2002 02:09:37 +0000 (02:09 +0000)
t/t20fill.t

index 025f3453f131b03176ab6a72dfc73dff3dc5f93a..1923d1dd76ef32057a4b1c86c266b4431b8a3481 100644 (file)
@@ -6,6 +6,7 @@ print "1..40\n";
 use Imager ':handy';
 use Imager::Fill;
 use Imager::Color::Float;
+use Config;
 
 sub ok ($$$);
 
@@ -242,7 +243,8 @@ ok($testnum++,
 
 # previous box fills to float images, or using the fountain fill
 # got into a loop here
-{
+
+if ($Config{d_alarm} eq 'define') {
   local $SIG{ALRM} = sub { die; };
 
   eval {
@@ -256,6 +258,10 @@ ok($testnum++,
   };
   $@ and ok($testnum++, 0, "linear box fill $@");
 }
+else {
+  print "ok $testnum # skipped can't test without alarm\n";
+  ++$testnum;
+}
 
 sub ok ($$$) {
   my ($num, $test, $desc) = @_;