From: Vincent Pit Date: Wed, 21 Jan 2009 20:20:04 +0000 (+0100) Subject: Report file/line of failures correctly X-Git-Tag: v0.28~14 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=391dfbafe931a004b429a0f13ca58b4d10f60887;p=perl%2Fmodules%2FVariable-Magic.git Report file/line of failures correctly --- diff --git a/t/lib/Variable/Magic/TestWatcher.pm b/t/lib/Variable/Magic/TestWatcher.pm index ef988d1..a8b5297 100644 --- a/t/lib/Variable/Magic/TestWatcher.pm +++ b/t/lib/Variable/Magic/TestWatcher.pm @@ -42,6 +42,7 @@ sub check (&;$$) { my $exp = _types shift; my $desc = shift; local %mg = (); + local $Test::Builder::Level = ($Test::Builder::Level || 0) + 1; my @ret = eval { $code->() }; is $@, '', $prefix . $desc . ' doesn\'t croak'; is_deeply \%mg, $exp, $prefix . $desc . ' triggers magic correctly';