line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Builder::Formatter; |
2
|
163
|
|
|
163
|
|
1577
|
use strict; |
|
163
|
|
|
|
|
370
|
|
|
163
|
|
|
|
|
4804
|
|
3
|
163
|
|
|
163
|
|
859
|
use warnings; |
|
163
|
|
|
|
|
345
|
|
|
163
|
|
|
|
|
9966
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302180'; |
6
|
|
|
|
|
|
|
|
7
|
163
|
|
|
163
|
|
72310
|
BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) } |
|
163
|
|
|
|
|
7796
|
|
8
|
|
|
|
|
|
|
|
9
|
163
|
|
|
163
|
|
1323
|
use Test2::Util::HashBase qw/no_header no_diag/; |
|
163
|
|
|
|
|
388
|
|
|
163
|
|
|
|
|
1227
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
163
|
|
|
163
|
|
1535
|
*OUT_STD = Test2::Formatter::TAP->can('OUT_STD'); |
13
|
163
|
|
|
|
|
795
|
*OUT_ERR = Test2::Formatter::TAP->can('OUT_ERR'); |
14
|
|
|
|
|
|
|
|
15
|
163
|
|
|
|
|
672
|
my $todo = OUT_ERR() + 1; |
16
|
163
|
|
|
|
|
61485
|
*OUT_TODO = sub() { $todo }; |
|
0
|
|
|
|
|
0
|
|
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub init { |
20
|
245
|
|
|
245
|
0
|
590
|
my $self = shift; |
21
|
245
|
|
|
|
|
1731
|
$self->SUPER::init(@_); |
22
|
245
|
|
|
|
|
959
|
$self->{+HANDLES}->[OUT_TODO] = $self->{+HANDLES}->[OUT_STD]; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub plan_tap { |
26
|
334
|
|
|
334
|
0
|
1008
|
my ($self, $f) = @_; |
27
|
|
|
|
|
|
|
|
28
|
334
|
100
|
|
|
|
1303
|
return if $self->{+NO_HEADER}; |
29
|
332
|
|
|
|
|
1844
|
return $self->SUPER::plan_tap($f); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub debug_tap { |
33
|
2
|
|
|
2
|
0
|
4
|
my ($self, $f, $num) = @_; |
34
|
2
|
50
|
|
|
|
7
|
return if $self->{+NO_DIAG}; |
35
|
2
|
|
|
|
|
10
|
my @out = $self->SUPER::debug_tap($f, $num); |
36
|
|
|
|
|
|
|
$self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package} |
37
|
2
|
50
|
33
|
|
|
19
|
&& $f->{about}->{package} eq 'Test::Builder::TodoDiag'; |
|
|
|
33
|
|
|
|
|
|
|
|
33
|
|
|
|
|
38
|
2
|
|
|
|
|
6
|
return @out; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub info_tap { |
42
|
882
|
|
|
882
|
0
|
1830
|
my ($self, $f) = @_; |
43
|
882
|
100
|
|
|
|
1901
|
return if $self->{+NO_DIAG}; |
44
|
881
|
|
|
|
|
2561
|
my @out = $self->SUPER::info_tap($f); |
45
|
|
|
|
|
|
|
$self->redirect(\@out) if @out && ref $f->{about} && defined $f->{about}->{package} |
46
|
881
|
100
|
33
|
|
|
7691
|
&& $f->{about}->{package} eq 'Test::Builder::TodoDiag'; |
|
|
|
33
|
|
|
|
|
|
|
|
66
|
|
|
|
|
47
|
881
|
|
|
|
|
2346
|
return @out; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub redirect { |
51
|
438
|
|
|
438
|
0
|
1162
|
my ($self, $out) = @_; |
52
|
438
|
|
|
|
|
1252
|
$_->[0] = OUT_TODO for @$out; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
646
|
|
|
646
|
0
|
1784
|
sub no_subtest_space { 1 } |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |