From: Tony Cook Date: Sun, 31 Mar 2002 02:09:37 +0000 (+0000) Subject: make sure we have alarm() support X-Git-Tag: Imager-0.48^2~407 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/f3b59de861fc20e4d3f85d721cd17756abb62ebc?ds=sidebyside make sure we have alarm() support --- diff --git a/t/t20fill.t b/t/t20fill.t index 025f3453..1923d1dd 100644 --- a/t/t20fill.t +++ b/t/t20fill.t @@ -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) = @_;