]> git.vpit.fr Git - perl/modules/rgit.git/blobdiff - t/16-levels.t
Update VPIT::TestHelpers to 15e8aee3
[perl/modules/rgit.git] / t / 16-levels.t
index 9a4410db5afc02365d651412dfefacd0091439ea..240ded6dcb17618f1408efe9a03470a5a6acdcf4 100644 (file)
@@ -1,15 +1,17 @@
 #!perl
 
+use 5.008;
+
 use strict;
 use warnings;
 
 use Test::More tests => 4;
 
 use App::Rgit::Config;
-use App::Rgit::Utils qw/:levels/;
+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");
+ $arc->$_($_) for qw<info warn err crit>;
+ is $buf, join('', @levels[$l .. $#levels]), "level $l ok";
 }
 
 close STDERR;