Skip to content
Permalink
Browse files

Fix "diag "foo"|"bar"

We allow junctions to be specified in e.g. "is", but if they fail, they
used to bomb on the "diag" being done.  This fixes the bombing.   This is
spectests clean.

Inspired by Text::CSV ecosystem fallout, following hash randomization changes
needing tests to be fixed.
  • Loading branch information...
lizmat committed Jul 4, 2018
1 parent 2a414ae commit 5ec2c96ec2df99701d755bb3bb99e8b2076ce616
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Test.pm6
@@ -423,14 +423,14 @@ multi sub subtest(&subtests, $desc = '') is export {
proclaim($status,$desc) or ($die_on_fail and die-on-fail);
}

sub diag(Mu $message) is export {
sub diag($message) is export {
# Always send user-triggered diagnostics to STDERR. This prevents
# cases of confusion of where diag() has to send its ouput when
# we are in the middle of TODO tests
_diag $message, :force-stderr;
}

sub _diag(Mu $message, :$force-stderr) {
sub _diag($message, :$force-stderr) {
_init_io() unless $output;
my $is_todo = !$force-stderr
&& ($subtest_todo_reason || $num_of_tests_run <= $todo_upto_test_num);

1 comment on commit 5ec2c96

@Tux

This comment has been minimized.

Copy link

commented on 5ec2c96 Jul 4, 2018

Yeah, Thanks!

Please sign in to comment.
You can’t perform that action at this time.