From: Vincent Pit Date: Sun, 28 Sep 2008 00:28:42 +0000 (+0200) Subject: t/30-bad.t is only TODO for non-debugging perls X-Git-Tag: v0.07~13 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=6168b77543644fe6ac8279401e4ac36ee578233d;p=perl%2Fmodules%2FTest-Valgrind.git t/30-bad.t is only TODO for non-debugging perls --- diff --git a/t/30-bad.t b/t/30-bad.t index f3313b0..0ac0129 100644 --- a/t/30-bad.t +++ b/t/30-bad.t @@ -7,10 +7,24 @@ use Config qw/%Config/; use Test::More; +my $dbg; + sub tester { my ($a, $desc) = @_; my $passed; - my $dbg = eval "Test::Valgrind::DEBUGGING()"; + if (!defined $dbg) { + eval " + use lib qw{blib/arch}; + require XSLoader; + XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); + "; + if ($@) { + $dbg = 0; + } else { + my $ret = eval "Test::Valgrind::DEBUGGING()"; + $dbg = $@ ? 0 : $ret; + } + } if ($desc =~ /still\s+reachable/) { $passed = $a >= 9900 && $a < 10100; if ($dbg) {