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 Jul 28, 2014
1 parent 2f974de commit bc4e880
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Test.pm
Expand Up @@ -176,11 +176,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);
$failure_output.print: $indents;
my $str-message = $message.Str.subst(rx/^^/, '# ', :g);
$str-message .= subst(rx/^^'#' \s+ $$/, '', :g);
$*ERR.say: $str-message;
$out.say: $indents ~ $str-message;
$time_before = nqp::p6box_n(nqp::time_n);
}

Expand Down

0 comments on commit bc4e880

Please sign in to comment.