in reply to debug output from TODO with Test::More
Hi 1nickt,
As far as I can tell from the Test::Builder doc, the output of diag is directed to a special handle during TODO tests. Apparently I can force that output to be displayed with Test::More->builder->todo_output(\*STDERR);. However, I don't find that very elegant since it does this unconditionally. (Update: Probably better: Test::More->builder->todo_output(Test::More->builder->failure_output);)
I played around with it a bit, here's a possibility to display a list of unexpectedly passing TODO tests without having to add a diag statement to every one of them. Stick this at the bottom of your test script (Perl v5.12 required for each @ARRAY):
my @details = Test::More->builder->details; while (my ($i,$t) = each @details) { next unless $$t{type} eq 'todo' && $$t{actual_ok}; diag "Passing TODO Test #".($i+1)." / $$t{name}"; }
(As you probably already know, there's also the "TODO passed" output that's already part of the "Test Summary Report". As far as I can tell from a look at the source, that's generated by TAP::Formatter::Base based on TAP::Parser's todo_passed.)
Hope this helps,
-- Hauke D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: debug output from TODO with Test::More
by Anonymous Monk on Jan 13, 2017 at 18:29 UTC | |
by haukex (Archbishop) on Jan 13, 2017 at 19:24 UTC | |
by Anonymous Monk on Jan 13, 2017 at 20:45 UTC | |
by 1nickt (Canon) on Jan 13, 2017 at 21:49 UTC | |
by Anonymous Monk on Jan 13, 2017 at 22:02 UTC | |
|