From: Vincent Pit Date: Wed, 24 Feb 2010 10:42:04 +0000 (+0100) Subject: Revamp t/16-levels.t X-Git-Tag: v0.07~18 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=270525a9f32911ff55fc0ee7b263a9eb3cd0a3ce;p=perl%2Fmodules%2Frgit.git Revamp t/16-levels.t --- diff --git a/t/16-levels.t b/t/16-levels.t index 9a4410d..38e126a 100644 --- a/t/16-levels.t +++ b/t/16-levels.t @@ -1,5 +1,7 @@ #!perl +use 5.008; + use strict; use warnings; @@ -8,8 +10,8 @@ use Test::More tests => 4; use App::Rgit::Config; use App::Rgit::Utils qw/:levels/; -local $SIG{__WARN__} = sub { diag @_ }; -local $SIG{__DIE__} = sub { diag @_ }; +local $SIG{__WARN__} = sub { diag 'warning:', @_ }; +local $SIG{__DIE__} = sub { diag 'exception:', @_ }; my %levels = ( info => INFO, @@ -26,13 +28,13 @@ for my $l (0 .. $#levels) { my $arc = App::Rgit::Config->new( root => 't', git => 't/bin/git', - debug => $levels{$levels[$l]} + debug => $levels{$levels[$l]}, ); my $buf = ''; close STDERR; open STDERR, '>', \$buf or die "open(STDERR, '>', \\\$buf): $!"; $arc->$_($_) for qw/info warn err crit/; - is($buf, join('', @levels[$l .. $#levels]), "level $l ok"); + is $buf, join('', @levels[$l .. $#levels]), "level $l ok"; } close STDERR;