Skip to content

Commit

Permalink
Squash an unhelpful YAML parser warning in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed May 14, 2017
1 parent 19f2dfa commit 722701b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions t/00_setup.t
Expand Up @@ -20,6 +20,16 @@ use Path::Class qw(dir file);
use Test::More 0.96;
use URI::FromHash qw( uri );

BEGIN {
# We test parsing bad YAML. This attempt emits a noisy warning which is not
# helpful in test output, so we'll suppress it here.
$SIG{__WARN__} = sub {
my $msg = shift;
return if $msg =~ m{found a duplicate key};
warn $msg;
};
}

# Ensure we're starting fresh
my $tmp_dir = tmp_dir();
$tmp_dir->rmtree;
Expand Down

0 comments on commit 722701b

Please sign in to comment.