in reply to debug output from TODO with Test::More

If I understand what you're trying to achieve, warn() seems to do the trick:

use warnings; use strict; use Test::More; TODO: { local $TODO = ''; is (1, 1, 'inside') and warn "*** unexpected pass at line " . __LINE__ ."\n"; } done_testing();

Output:

ok 1 - inside *** unexpected pass at line 9 1..1

Replies are listed 'Best First'.
Re^2: debug output from TODO with Test::More
by 1nickt (Canon) on Jan 13, 2017 at 15:14 UTC

    Well, I'll be a ding-dong-dang.

    I had tested with print, but not warn. Thanks, couldn't ask for a better answer !


    The way forward always starts with a minimal test.

      I've done things like this before for nearly the same reason, but I added a $SIG{__WARN__} handler to filter these warnings out, and dump them all to a file so I could review them all in one place instead of scouring through hundreds of lines of test output.