From: Tony Cook Date: Mon, 29 Nov 2004 10:00:56 +0000 (+0000) Subject: more test entries X-Git-Tag: Imager-0.48^2~288 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/f43ac16ce2df00bf14b6d8f954fe4e9f475ac613 more test entries --- diff --git a/t/testtools.pl b/t/testtools.pl index ad4886f9..e36d8073 100644 --- a/t/testtools.pl +++ b/t/testtools.pl @@ -82,6 +82,27 @@ sub requireokx { } } +sub useokx { + my ($module, $comment, @imports) = @_; + + my $pack = caller; + eval <import(\@imports); +EOS + unless (okx(!$@, $comment)) { + my $msg = $@; + $msg =~ s/\n+$//; + $msg =~ s/\n/\n# /g; + print "# $msg\n"; + return 0; + } + else { + return 1; + } +} + sub matchn($$$$) { my ($num, $str, $re, $comment) = @_;