Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Catch exceptions in yaml_ok.

  • Loading branch information...
commit a15d3abdbb67045e03192ed50dff3233d7627559 1 parent 73514c8
Vasily Chekalkin bacek authored

Showing 1 changed file with 8 additions and 2 deletions. Show diff stats Hide diff stats

  1. +8 2 t/lib/Test.pm
10 t/lib/Test.pm
@@ -3,8 +3,14 @@
3 3
4 4 our sub yaml_ok($yaml, $expected, $description, *%adverbs) {
5 5 my $parser := YAML::Tiny.new;
6   - my $result := $parser.read_string($yaml);
7   - is_deeply($expected, $result, $description, todo => %adverbs<todo>);
  6 + try {
  7 + my $result := $parser.read_string($yaml);
  8 + is_deeply($expected, $result, $description, todo => %adverbs<todo>);
  9 +
  10 + CATCH {
  11 + nok(1, "Parse failed '{ $! }'");
  12 + }
  13 + }
8 14 }
9 15
10 16 Q:PIR {

0 comments on commit a15d3ab

Please sign in to comment.
Something went wrong with that request. Please try again.