Skip to content

Commit

Permalink
support TODO point
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Sep 9, 2014
1 parent dc26bbc commit 68e9966
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions lib/TestML/Runtime/TAP.pm
Expand Up @@ -62,8 +62,11 @@ sub assert_EQ {
my ($self, $got, $want) = @_;
$got = $got->str->value;
$want = $want->str->value;
my $block = $self->function->getvar('Block');
if (exists $block->points->{TODO}) {
$self->tap_object->todo_start;
}
if ($got ne $want and $want =~ /\n/) {
my $block = $self->function->getvar('Block');
my $diff = $self->function->getvar('Diff');
if ($diff or exists $block->points->{DIFF}) {
require Text::Diff;
Expand All @@ -78,11 +81,16 @@ sub assert_EQ {
return;
}
}
$self->tap_object->is_eq(
$got,
$want,
$self->get_label,
);
else {
$self->tap_object->is_eq(
$got,
$want,
$self->get_label,
);
}
if (exists $block->points->{TODO}) {
$self->tap_object->todo_end;
}
}

sub assert_HAS {
Expand Down

0 comments on commit 68e9966

Please sign in to comment.