Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Print TODO diags to todo_output
  • Loading branch information
hoelzro committed Aug 17, 2014
1 parent b175465 commit f93ca4d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Test.pm
Expand Up @@ -199,10 +199,13 @@ sub subtest(&subtests, $desc = '') is export {
}

sub diag(Mu $message) is export {
my $is_todo = $num_of_tests_run <= $todo_upto_test_num;
my $out = $is_todo ?? $todo_output !! $failure_output;

$time_after = nqp::p6box_n(nqp::time_n);
my $str-message = $message.Str.subst(rx/^^/, '# ', :g);
$str-message .= subst(rx/^^'#' \s+ $$/, '', :g);
$failure_output.say: $indents ~ $str-message;
$out.say: $indents ~ $str-message;
$time_before = nqp::p6box_n(nqp::time_n);
}

Expand Down

0 comments on commit f93ca4d

Please sign in to comment.