| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test::More::Diagnostic; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
22312
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
32
|
|
|
4
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
38
|
|
|
5
|
1
|
|
|
1
|
|
6
|
use Carp; |
|
|
1
|
|
|
|
|
7
|
|
|
|
1
|
|
|
|
|
90
|
|
|
6
|
1
|
|
|
1
|
|
1089
|
use TAP::Parser::YAMLish::Writer; |
|
|
1
|
|
|
|
|
2956
|
|
|
|
1
|
|
|
|
|
60
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.2'; |
|
9
|
|
|
|
|
|
|
our @ISA = qw( Test::Builder ); |
|
10
|
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
7
|
use constant KNOWN_TAP_VERSION => 13; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
396
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# Bless builder into our package. |
|
14
|
|
|
|
|
|
|
bless Test::More->builder, __PACKAGE__; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub _should_yaml { |
|
17
|
0
|
|
|
0
|
|
0
|
my $tap_version = $ENV{TAP_VERSION}; |
|
18
|
0
|
|
0
|
|
|
0
|
return defined $tap_version && $tap_version >= KNOWN_TAP_VERSION; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Fix up caller |
|
22
|
|
|
|
|
|
|
sub caller { |
|
23
|
7
|
|
|
7
|
1
|
559
|
my ( $self, $height ) = @_; |
|
24
|
7
|
|
50
|
|
|
21
|
$height ||= 0; |
|
25
|
7
|
|
|
|
|
37
|
return $self->SUPER::caller( $height + 2 ); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
{ |
|
29
|
|
|
|
|
|
|
my $did_version = 0; |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub _print { |
|
32
|
3
|
|
|
3
|
|
239
|
my $self = shift; |
|
33
|
3
|
100
|
|
|
|
9
|
unless ( $did_version ) { |
|
34
|
1
|
|
|
|
|
10
|
$self->SUPER::_print( 'TAP version ' . KNOWN_TAP_VERSION ); |
|
35
|
1
|
|
|
|
|
4790
|
$did_version++; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
3
|
|
|
|
|
19
|
return $self->SUPER::_print( @_ ); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Add YAML to OK |
|
42
|
|
|
|
|
|
|
sub ok { |
|
43
|
2
|
|
|
2
|
1
|
303
|
my ( $self, $test, $name ) = @_; |
|
44
|
2
|
|
|
|
|
12
|
my $ok = $self->SUPER::ok( $test, $name ); |
|
45
|
2
|
50
|
33
|
|
|
102
|
if ( !$ok && _should_yaml() ) { |
|
46
|
0
|
|
|
|
|
0
|
my ( $pack, $file, $line ) = $self->caller( -1 ); |
|
47
|
|
|
|
|
|
|
TAP::Parser::YAMLish::Writer->new->write( |
|
48
|
|
|
|
|
|
|
{ |
|
49
|
|
|
|
|
|
|
file => $file, |
|
50
|
|
|
|
|
|
|
line => $line, |
|
51
|
|
|
|
|
|
|
}, |
|
52
|
|
|
|
|
|
|
sub { |
|
53
|
0
|
|
|
0
|
|
0
|
$self->_print( ' ' . $_[0] ); |
|
54
|
|
|
|
|
|
|
} |
|
55
|
0
|
|
|
|
|
0
|
); |
|
56
|
|
|
|
|
|
|
} |
|
57
|
2
|
|
|
|
|
6
|
return $ok; |
|
58
|
|
|
|
|
|
|
} |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
|
61
|
|
|
|
|
|
|
__END__ |