From: Karen Etheridge Date: Wed, 11 Sep 2013 16:26:26 +0000 (-0700) Subject: remove use of Test::Fatal, done_testing X-Git-Tag: v1.000018~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcddf99e50e8b4d958156109c299afefd3418068;p=p5sagit%2FModule-Metadata.git remove use of Test::Fatal, done_testing --- diff --git a/Changes b/Changes index 59e7215..db78af0 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Release history for Module-Metadata + - re-release of detainting fix without unstated non-core test dependencies + 1.000017 2013-09-10 - detaint version, if needed (RT#88576, Chris Williams) diff --git a/t/taint.t b/t/taint.t index 8ca1346..ef527de 100644 --- a/t/taint.t +++ b/t/taint.t @@ -3,9 +3,19 @@ use strict; use warnings; use 5.008000; # for ${^TAINT} +use Test::More tests => 2; use Module::Metadata; -use Test::More; -use Test::Fatal; +use Carp 'croak'; + +# stolen liberally from Class-Tiny/t/lib/TestUtils.pm - thanks xdg! +sub exception(&) { + my $code = shift; + my $success = eval { $code->(); 1 }; + my $err = $@; + return undef if $success; # original returned '' + croak "Execution died, but the error was lost" unless $@; + return $@; +} ok(${^TAINT}, 'taint flag is set'); @@ -17,4 +27,3 @@ is( 'no exception', ); -done_testing;