NAME
TB2::Formatter::TAP::v13 - Formatter as TAP version 13
SYNOPSIS
use TB2::Formatter::TAP::v13;
my $formatter = Test:::Builder2::Formatter::TAP::v13->new;
my $ec = TB2::EventCoordinator->create(
formatters => [$formatter]
);
$ec->post_event($event);
$ec->post_event($result);
DESCRIPTION
Formatter TB2::Result's as TAP version 13.
METHODS
As TB2::Formatter with the following changes and additions.
out
err
These methods are just shorthand for:
$output->write(out => @args);
$output->write(err => @args);
counter
my $counter = $formatter->counter;
$formatter->counter($counter);
Gets/sets the TB2::Counter for this formatter keeping track of the test number.
use_numbers
my $use_numbers = $formatter->use_numbers;
$formatter->use_numbers($use_numbers);
Get/sets if the TAP output should include the test number. Defaults to true. NOTE: the counter will still incrememnt this only toggles if the number should be used in the display.
handle_result
Takes a TB2::Result
as an argument and displays the result details.
comment
my $comment = $self->comment(@message);
Will turn the given @message into a TAP comment.
# returns "# Basset houndsgot long ears"
$self->comment("Basset hounds", "got long ears");