From f3b59de861fc20e4d3f85d721cd17756abb62ebc Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Sun, 31 Mar 2002 02:09:37 +0000 Subject: [PATCH] make sure we have alarm() support --- t/t20fill.t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) = @_; -- 2.39.5