Skip to content

Commit

Permalink
Make it respond to changes in the test output location and Test::Buil…
Browse files Browse the repository at this point in the history
…der singleton.
  • Loading branch information
schwern committed Jul 10, 2012
1 parent 4b245a3 commit b6be971
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions lib/Test/TAPv13.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,18 @@ package Test::TAPv13;
use Test::Builder;
use Data::YAML::Writer;

my $Test;
my $OUT;

BEGIN {
$Test = Test::Builder->new;
$OUT = $Test->output;
}

sub tap13_version {
print $OUT "TAP version 13\n";
my $out = Test::Builder->new->output;
print $out "TAP version 13\n";
}

sub tap13_pragma {
my ($msg) = @_;
print $OUT $Test->_indent."pragma $msg\n";

my $tb = Test::Builder->new;
my $out = $tb->output;

print $out $tb->_indent."pragma $msg\n";
}

sub tap13_yaml {
Expand All @@ -30,9 +27,12 @@ sub tap13_yaml {
my $output;
$writer->write($data, \$output);

my $indent = $Test->_indent. " ";
my $tb = Test::Builder->new;
my $out = $tb->output;

my $indent = $tb->_indent. " ";
$output =~ s/^/$indent/msg;
print $OUT $output;
print $out $output;
}

sub _installer {
Expand Down

0 comments on commit b6be971

Please sign in to comment.