| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Test2::Event::Skip; |
|
2
|
246
|
|
|
246
|
|
2116
|
use strict; |
|
|
246
|
|
|
|
|
528
|
|
|
|
246
|
|
|
|
|
6999
|
|
|
3
|
246
|
|
|
246
|
|
1216
|
use warnings; |
|
|
246
|
|
|
|
|
501
|
|
|
|
246
|
|
|
|
|
13344
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '1.302181'; |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
246
|
|
|
246
|
|
1458
|
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } |
|
|
246
|
|
|
|
|
13677
|
|
|
9
|
246
|
|
|
246
|
|
1697
|
use Test2::Util::HashBase qw{reason}; |
|
|
246
|
|
|
|
|
620
|
|
|
|
246
|
|
|
|
|
1832
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub init { |
|
12
|
26
|
|
|
26
|
0
|
48
|
my $self = shift; |
|
13
|
26
|
|
|
|
|
136
|
$self->SUPER::init; |
|
14
|
26
|
|
|
|
|
63
|
$self->{+EFFECTIVE_PASS} = 1; |
|
15
|
|
|
|
|
|
|
} |
|
16
|
|
|
|
|
|
|
|
|
17
|
0
|
|
|
0
|
1
|
0
|
sub causes_fail { 0 } |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub summary { |
|
20
|
2
|
|
|
2
|
1
|
5
|
my $self = shift; |
|
21
|
2
|
|
|
|
|
13
|
my $out = $self->SUPER::summary(@_); |
|
22
|
|
|
|
|
|
|
|
|
23
|
2
|
100
|
|
|
|
6
|
if (my $reason = $self->reason) { |
|
24
|
1
|
|
|
|
|
4
|
$out .= " (SKIP: $reason)"; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
else { |
|
27
|
1
|
|
|
|
|
3
|
$out .= " (SKIP)"; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
2
|
|
|
|
|
8
|
return $out; |
|
31
|
|
|
|
|
|
|
} |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub extra_amnesty { |
|
34
|
26
|
|
|
26
|
0
|
51
|
my $self = shift; |
|
35
|
|
|
|
|
|
|
|
|
36
|
26
|
|
|
|
|
47
|
my @out; |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
push @out => { |
|
39
|
|
|
|
|
|
|
tag => 'TODO', |
|
40
|
|
|
|
|
|
|
details => $self->{+TODO}, |
|
41
|
26
|
100
|
|
|
|
107
|
} if defined $self->{+TODO}; |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
push @out => { |
|
44
|
|
|
|
|
|
|
tag => 'skip', |
|
45
|
26
|
|
|
|
|
111
|
details => $self->{+REASON}, |
|
46
|
|
|
|
|
|
|
inherited => 0, |
|
47
|
|
|
|
|
|
|
}; |
|
48
|
|
|
|
|
|
|
|
|
49
|
26
|
|
|
|
|
108
|
return @out; |
|
50
|
|
|
|
|
|
|
} |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
1; |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
__END__ |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=pod |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=encoding UTF-8 |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 NAME |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Test2::Event::Skip - Skip event type |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Skip events bump test counts just like L<Test2::Event::Ok> events, but |
|
67
|
|
|
|
|
|
|
they can never fail. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use Test2::API qw/context/; |
|
72
|
|
|
|
|
|
|
use Test2::Event::Skip; |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
my $ctx = context(); |
|
75
|
|
|
|
|
|
|
my $event = $ctx->skip($name, $reason); |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
or: |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
my $ctx = context(); |
|
80
|
|
|
|
|
|
|
my $event = $ctx->send_event( |
|
81
|
|
|
|
|
|
|
'Skip', |
|
82
|
|
|
|
|
|
|
name => $name, |
|
83
|
|
|
|
|
|
|
reason => $reason, |
|
84
|
|
|
|
|
|
|
); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=head1 ACCESSORS |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=over 4 |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=item $reason = $e->reason |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The original true/false value of whatever was passed into the event (but |
|
93
|
|
|
|
|
|
|
reduced down to 1 or 0). |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=back |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=head1 SOURCE |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
The source code repository for Test2 can be found at |
|
100
|
|
|
|
|
|
|
F<http://github.com/Test-More/test-more/>. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 MAINTAINERS |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=over 4 |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=back |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 AUTHORS |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=over 4 |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=item Chad Granum E<lt>exodist@cpan.orgE<gt> |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=back |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>. |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or |
|
123
|
|
|
|
|
|
|
modify it under the same terms as Perl itself. |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
See F<http://www.perl.com/perl/misc/Artistic.html> |
|
126
|
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |