From: Vincent Pit Date: Sun, 23 Aug 2009 15:55:58 +0000 (+0200) Subject: Make sure PERL_INDIRECT_PM_DISABLE is not set before running tests X-Git-Tag: v0.18~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=e11d9a3efc1dcc5648202bd7651a982477bbc587 Make sure PERL_INDIRECT_PM_DISABLE is not set before running tests --- diff --git a/t/10-args.t b/t/10-args.t index d735295..4037c60 100644 --- a/t/10-args.t +++ b/t/10-args.t @@ -5,6 +5,8 @@ use warnings; use Test::More tests => 4 + 1 + 1; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + sub expect { my ($pkg) = @_; qr/^Indirect call of method "new" on object "$pkg" at \(eval \d+\) line \d+/; diff --git a/t/11-line.t b/t/11-line.t index 6832844..3bebba0 100644 --- a/t/11-line.t +++ b/t/11-line.t @@ -5,6 +5,8 @@ use warnings; use Test::More tests => 3 * 4; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + sub expect { my ($pkg, $line) = @_; return qr/^Indirect\s+call\s+of\s+method\s+"new"\s+on\s+object\s+"$pkg"\s+at\s+\(eval\s+\d+\)\s+line\s+$line/; diff --git a/t/20-good.t b/t/20-good.t index 4a7c3a0..3539498 100644 --- a/t/20-good.t +++ b/t/20-good.t @@ -11,6 +11,8 @@ use warnings; use Test::More tests => 56 * 8; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + my ($obj, $pkg, $cb, $x, @a); our $y; sub meh; diff --git a/t/21-bad.t b/t/21-bad.t index 6852426..f4231d7 100644 --- a/t/21-bad.t +++ b/t/21-bad.t @@ -17,6 +17,8 @@ BEGIN { use Test::More tests => 3 * (4 * $tests + $reports) + 4; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + my ($obj, $x); our ($y, $bloop); diff --git a/t/22-bad-mixed.t b/t/22-bad-mixed.t index 57282e2..cff7565 100644 --- a/t/22-bad-mixed.t +++ b/t/22-bad-mixed.t @@ -11,6 +11,8 @@ use warnings; use Test::More tests => 3 * 9; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + sub meh; my @warns; diff --git a/t/23-bad-notaint.t b/t/23-bad-notaint.t index cb7580b..200380d 100644 --- a/t/23-bad-notaint.t +++ b/t/23-bad-notaint.t @@ -5,6 +5,8 @@ use warnings; use Test::More tests => 1; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + { my @warns; { diff --git a/t/30-scope.t b/t/30-scope.t index 14b987c..78b2b1d 100644 --- a/t/30-scope.t +++ b/t/30-scope.t @@ -8,6 +8,8 @@ BEGIN { $tests = 18 } use Test::More tests => (1 + $tests + 1) + 3 + 3 + 3 + 5 + 1; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + use lib 't/lib'; my %wrong = map { $_ => 1 } 2, 3, 5, 7, 9, 10, 14, 15, 17, 18; diff --git a/t/40-threads.t b/t/40-threads.t index 0bae40a..16af4ca 100644 --- a/t/40-threads.t +++ b/t/40-threads.t @@ -18,6 +18,7 @@ use threads; use Test::More; BEGIN { + delete $ENV{PERL_INDIRECT_PM_DISABLE}; require indirect; if (indirect::I_THREADSAFE()) { plan tests => 10 * 2 * (2 + 3); diff --git a/t/41-memory.t b/t/41-memory.t index 0228929..6805d9e 100644 --- a/t/41-memory.t +++ b/t/41-memory.t @@ -4,5 +4,7 @@ use lib 't/lib'; use Test::More tests => 1; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + eval "require indirect::Test0::Oooooo::Pppppppp"; is($@, '', 'memory reallocation to an uncatched optype'); diff --git a/t/42-stress.t b/t/42-stress.t index bb31787..cf474a8 100644 --- a/t/42-stress.t +++ b/t/42-stress.t @@ -8,6 +8,8 @@ BEGIN { $count = 1_000 } use Test::More tests => 2 * $count; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + for (1 .. $count) { my @errs; { diff --git a/t/80-regressions.t b/t/80-regressions.t index b926730..19a6693 100644 --- a/t/80-regressions.t +++ b/t/80-regressions.t @@ -5,6 +5,8 @@ use warnings; use Test::More tests => 1; +BEGIN { delete $ENV{PERL_INDIRECT_PM_DISABLE} } + sub run_perl { my $code = shift;