Skip to content

Commit

Permalink
Catch exceptions in yaml_ok.
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed Jan 29, 2011
1 parent 73514c8 commit a15d3ab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/lib/Test.pm
Expand Up @@ -3,8 +3,14 @@


our sub yaml_ok($yaml, $expected, $description, *%adverbs) { our sub yaml_ok($yaml, $expected, $description, *%adverbs) {
my $parser := YAML::Tiny.new; my $parser := YAML::Tiny.new;
my $result := $parser.read_string($yaml); try {
is_deeply($expected, $result, $description, todo => %adverbs<todo>); my $result := $parser.read_string($yaml);
is_deeply($expected, $result, $description, todo => %adverbs<todo>);

CATCH {
nok(1, "Parse failed '{ $! }'");
}
}
} }


Q:PIR { Q:PIR {
Expand Down

0 comments on commit a15d3ab

Please sign in to comment.