line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Most; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
96226
|
use warnings; |
|
16
|
|
|
|
|
118
|
|
|
16
|
|
|
|
|
608
|
|
4
|
17
|
|
|
17
|
|
87
|
use strict; |
|
17
|
|
|
|
|
32
|
|
|
17
|
|
|
|
|
447
|
|
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
5790
|
use Test::Most::Exception 'throw_failure'; |
|
17
|
|
|
|
|
44
|
|
|
17
|
|
|
|
|
1000
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# XXX don't use 'base' as it can override signal handlers |
9
|
17
|
|
|
17
|
|
7301
|
use Test::Builder::Module; |
|
17
|
|
|
|
|
928108
|
|
|
17
|
|
|
|
|
117
|
|
10
|
|
|
|
|
|
|
our ( @ISA, @EXPORT, $DATA_DUMPER_NAMES_INSTALLED ); |
11
|
|
|
|
|
|
|
my $HAVE_TIME_HIRES; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BEGIN { |
14
|
|
|
|
|
|
|
|
15
|
17
|
|
|
17
|
|
12061
|
require Test::More; |
16
|
17
|
50
|
|
|
|
79501
|
if (Test::More->can('TB_PROVIDER_META')) { |
17
|
1
|
|
|
|
|
6
|
Test::More->import(import => [ '!explain' ]); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
else { |
20
|
|
|
|
|
|
|
# There's some strange fiddling around with import(), so this allows us to |
21
|
|
|
|
|
|
|
# be nicely backwards compatible to earlier versions of Test::More. |
22
|
16
|
|
|
|
|
52
|
@Test::More::EXPORT = grep { $_ ne 'explain' } @Test::More::EXPORT; |
|
448
|
|
|
|
|
656
|
|
23
|
16
|
|
|
|
|
93
|
Test::More->import; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
16
|
|
|
16
|
|
4414
|
eval "use Time::HiRes"; |
|
16
|
|
|
|
|
9170
|
|
|
16
|
|
|
|
|
23650
|
|
|
16
|
|
|
|
|
68
|
|
27
|
16
|
50
|
|
|
|
2137
|
$HAVE_TIME_HIRES = 1 unless $@; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
16
|
|
|
16
|
|
103
|
use Test::Builder; |
|
16
|
|
|
|
|
26
|
|
|
16
|
|
|
|
|
525
|
|
31
|
|
|
|
|
|
|
my $OK_FUNC; |
32
|
|
|
|
|
|
|
BEGIN { |
33
|
16
|
|
|
16
|
|
1959
|
$OK_FUNC = \&Test::Builder::ok; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $VERSION = '0.37'; |
37
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
BEGIN { |
40
|
16
|
|
|
16
|
|
326
|
@ISA = qw(Test::Builder::Module); |
41
|
|
|
|
|
|
|
@EXPORT = ( |
42
|
|
|
|
|
|
|
Test::More->can('TB_PROVIDER_META') |
43
|
16
|
50
|
|
|
|
3856
|
? grep { $_ ne 'TODO' } keys( %{Test::More->TB_PROVIDER_META->{attrs}}) |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
44
|
|
|
|
|
|
|
: @Test::More::EXPORT, |
45
|
|
|
|
|
|
|
qw< |
46
|
|
|
|
|
|
|
$TODO |
47
|
|
|
|
|
|
|
all_done |
48
|
|
|
|
|
|
|
bail_on_fail |
49
|
|
|
|
|
|
|
die_on_fail |
50
|
|
|
|
|
|
|
explain |
51
|
|
|
|
|
|
|
always_explain |
52
|
|
|
|
|
|
|
last_test_failed |
53
|
|
|
|
|
|
|
restore_fail |
54
|
|
|
|
|
|
|
set_failure_handler |
55
|
|
|
|
|
|
|
show |
56
|
|
|
|
|
|
|
always_show |
57
|
|
|
|
|
|
|
> |
58
|
|
|
|
|
|
|
); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub import { |
62
|
17
|
|
|
17
|
|
1093
|
my $bail_set = 0; |
63
|
|
|
|
|
|
|
|
64
|
17
|
|
|
|
|
36
|
my %modules_to_load = map { $_ => 1 } qw/ |
|
68
|
|
|
|
|
173
|
|
65
|
|
|
|
|
|
|
Test::Differences |
66
|
|
|
|
|
|
|
Test::Exception |
67
|
|
|
|
|
|
|
Test::Deep |
68
|
|
|
|
|
|
|
Test::Warn |
69
|
|
|
|
|
|
|
/; |
70
|
17
|
|
|
|
|
178
|
warnings->import; |
71
|
17
|
|
|
|
|
104
|
strict->import; |
72
|
16
|
|
|
16
|
|
2703
|
eval "use Data::Dumper::Names 0.03"; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
1091
|
|
73
|
17
|
|
|
|
|
73
|
$DATA_DUMPER_NAMES_INSTALLED = !$@; |
74
|
|
|
|
|
|
|
|
75
|
17
|
100
|
|
|
|
102
|
if ( $ENV{BAIL_ON_FAIL} ) { |
76
|
1
|
|
|
|
|
2
|
$bail_set = 1; |
77
|
1
|
|
|
|
|
1
|
bail_on_fail(); |
78
|
|
|
|
|
|
|
} |
79
|
17
|
100
|
100
|
|
|
130
|
if ( !$bail_set and $ENV{DIE_ON_FAIL} ) { |
80
|
1
|
|
|
|
|
3
|
die_on_fail(); |
81
|
|
|
|
|
|
|
} |
82
|
17
|
|
|
|
|
90
|
for my $i ( 0 .. $#_ ) { |
83
|
44
|
100
|
|
|
|
114
|
if ( 'bail' eq $_[$i] ) { |
84
|
1
|
|
|
|
|
17
|
splice @_, $i, 1; |
85
|
1
|
|
|
|
|
4
|
bail_on_fail(); |
86
|
1
|
|
|
|
|
1
|
$bail_set = 1; |
87
|
1
|
|
|
|
|
3
|
last; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
} |
90
|
17
|
|
|
|
|
42
|
my $caller = caller; |
91
|
17
|
|
|
|
|
77
|
for my $i ( 0 .. $#_ ) { |
92
|
45
|
100
|
|
|
|
107
|
if ( 'timeit' eq $_[$i] ) { |
93
|
1
|
|
|
|
|
5
|
splice @_, $i, 1; |
94
|
16
|
|
|
16
|
|
118
|
no strict; |
|
16
|
|
|
|
|
26
|
|
|
16
|
|
|
|
|
7338
|
|
95
|
1
|
|
|
|
|
1
|
*{"${caller}::timeit"} = \&timeit; |
|
1
|
|
|
|
|
7
|
|
96
|
1
|
|
|
|
|
2
|
last; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
17
|
|
|
|
|
30
|
my %exclude_symbol; |
101
|
17
|
|
|
|
|
35
|
my $i = 0; |
102
|
|
|
|
|
|
|
|
103
|
17
|
|
|
|
|
32
|
foreach my $do_not_import_by_default (qw/blessed reftype/) { |
104
|
34
|
50
|
|
|
|
53
|
if ( grep { $_ eq $do_not_import_by_default } @_ ) { |
|
88
|
|
|
|
|
187
|
|
105
|
0
|
|
|
|
|
0
|
@_ = grep { $_ ne $do_not_import_by_default } @_; |
|
0
|
|
|
|
|
0
|
|
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
34
|
|
|
|
|
81
|
$exclude_symbol{$do_not_import_by_default} = 1; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
17
|
|
|
|
|
51
|
while ($i < @_) { |
113
|
52
|
100
|
100
|
|
|
187
|
if ( !$bail_set and ( 'die' eq $_[$i] ) ) { |
114
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
115
|
1
|
|
|
|
|
3
|
die_on_fail(); |
116
|
1
|
|
|
|
|
2
|
$i = 0; |
117
|
1
|
|
|
|
|
11
|
next; |
118
|
|
|
|
|
|
|
} |
119
|
51
|
100
|
|
|
|
132
|
if ( $_[$i] =~ /^-(.*)/ ) { |
120
|
1
|
|
|
|
|
2
|
my $module = $1; |
121
|
1
|
|
|
|
|
4
|
splice @_, $i, 1; |
122
|
1
|
50
|
|
|
|
3
|
unless (exists $modules_to_load{$module}) { |
123
|
0
|
|
|
|
|
0
|
require Carp; |
124
|
0
|
|
|
|
|
0
|
Carp::croak("Cannot remove non-existent Test::Module ($module)"); |
125
|
|
|
|
|
|
|
} |
126
|
1
|
|
|
|
|
2
|
delete $modules_to_load{$module}; |
127
|
1
|
|
|
|
|
1
|
$i = 0; |
128
|
1
|
|
|
|
|
3
|
next; |
129
|
|
|
|
|
|
|
} |
130
|
50
|
100
|
|
|
|
114
|
if ( $_[$i] =~ /^!(.*)/ ) { |
131
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
132
|
1
|
|
|
|
|
2
|
$exclude_symbol{$1} = 1; |
133
|
1
|
|
|
|
|
2
|
$i = 0; |
134
|
1
|
|
|
|
|
2
|
next; |
135
|
|
|
|
|
|
|
} |
136
|
49
|
100
|
|
|
|
102
|
if ( 'defer_plan' eq $_[$i] ) { |
137
|
1
|
|
|
|
|
5
|
require Carp; |
138
|
1
|
50
|
|
|
|
12
|
Carp::carp(<<'END') unless $ENV{DO_NOT_WARN_ON_DEFER_PLAN}; |
139
|
|
|
|
|
|
|
defer_plan() is deprecated and will be removed in a future release of |
140
|
|
|
|
|
|
|
Test::Most. It's functionality is provided by Test::More's done_testing(), |
141
|
|
|
|
|
|
|
first added in 2009 (0.88). |
142
|
|
|
|
|
|
|
END |
143
|
1
|
|
|
|
|
3
|
splice @_, $i, 1; |
144
|
|
|
|
|
|
|
|
145
|
1
|
|
|
|
|
4
|
my $builder = Test::Builder->new; |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
# XXX I don't like setting this directly, but |
148
|
|
|
|
|
|
|
# Test::Builder::has_plan isn't public |
149
|
1
|
|
|
|
|
12
|
$builder->{Have_Plan} = 1; |
150
|
1
|
|
|
|
|
1
|
$builder->{TEST_MOST_deferred_plan} = 1; |
151
|
1
|
|
|
|
|
2
|
$builder->{TEST_MOST_all_done} = 0; |
152
|
1
|
|
|
|
|
1
|
$i = 0; |
153
|
1
|
|
|
|
|
3
|
next; |
154
|
|
|
|
|
|
|
} |
155
|
48
|
|
|
|
|
98
|
$i++; |
156
|
|
|
|
|
|
|
} |
157
|
17
|
|
|
|
|
62
|
foreach my $module (keys %modules_to_load) { |
158
|
16
|
|
|
16
|
|
9474
|
eval "use $module"; |
|
16
|
|
|
16
|
|
168590
|
|
|
16
|
|
|
16
|
|
527
|
|
|
16
|
|
|
15
|
|
9179
|
|
|
16
|
|
|
|
|
131334
|
|
|
16
|
|
|
|
|
454
|
|
|
16
|
|
|
|
|
8729
|
|
|
16
|
|
|
|
|
92143
|
|
|
16
|
|
|
|
|
456
|
|
|
15
|
|
|
|
|
8370
|
|
|
15
|
|
|
|
|
131897
|
|
|
15
|
|
|
|
|
485
|
|
|
67
|
|
|
|
|
3726
|
|
159
|
|
|
|
|
|
|
|
160
|
67
|
50
|
|
|
|
7660
|
if ( my $error = $@) { |
161
|
0
|
|
|
|
|
0
|
require Carp; |
162
|
0
|
|
|
|
|
0
|
Carp::croak($error); |
163
|
|
|
|
|
|
|
} |
164
|
16
|
|
|
16
|
|
126
|
no strict 'refs'; |
|
16
|
|
|
|
|
35
|
|
|
16
|
|
|
|
|
6037
|
|
165
|
|
|
|
|
|
|
# Note: export_to_level would be better here. |
166
|
67
|
|
|
|
|
158
|
push @EXPORT => grep { !$exclude_symbol{$_} } @{"${module}::EXPORT"}; |
|
1084
|
|
|
|
|
1735
|
|
|
67
|
|
|
|
|
236
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
# 'magic' goto to avoid updating the callstack |
170
|
17
|
|
|
|
|
162
|
goto &Test::Builder::Module::import; |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub explain { |
174
|
6
|
|
|
6
|
1
|
13480
|
_explain(\&Test::More::note, @_); |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub timeit(&;$) { |
179
|
2
|
|
|
2
|
1
|
888
|
my ( $code, $message ) = @_; |
180
|
2
|
50
|
|
|
|
6
|
unless($HAVE_TIME_HIRES) { |
181
|
0
|
|
|
|
|
0
|
Test::Most::diag("timeit: Time::HiRes not installed"); |
182
|
0
|
|
|
|
|
0
|
$code->(); |
183
|
|
|
|
|
|
|
} |
184
|
2
|
100
|
|
|
|
5
|
if ( !$message ) { |
185
|
1
|
|
|
|
|
4
|
my ( $package, $filename, $line ) = caller; |
186
|
1
|
|
|
|
|
5
|
$message = "$filename line $line"; |
187
|
|
|
|
|
|
|
} |
188
|
2
|
|
|
|
|
8
|
my $start = [Time::HiRes::gettimeofday()]; |
189
|
2
|
|
|
|
|
5
|
$code->(); |
190
|
2
|
|
|
|
|
551
|
explain( |
191
|
|
|
|
|
|
|
sprintf "$message: took %s seconds" => Time::HiRes::tv_interval($start) ); |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub always_explain { |
195
|
2
|
|
|
2
|
1
|
2040
|
_explain(\&Test::More::diag, @_); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub _explain { |
199
|
10
|
|
|
10
|
|
21
|
my $diag = shift; |
200
|
16
|
|
|
16
|
|
151
|
no warnings 'once'; |
|
16
|
|
|
|
|
38
|
|
|
16
|
|
|
|
|
4310
|
|
201
|
|
|
|
|
|
|
$diag->( |
202
|
|
|
|
|
|
|
map { |
203
|
10
|
|
|
|
|
25
|
ref $_ |
204
|
14
|
100
|
|
|
|
156
|
? do { |
205
|
5
|
|
|
|
|
29
|
require Data::Dumper; |
206
|
5
|
|
|
|
|
9
|
local $Data::Dumper::Indent = 1; |
207
|
5
|
|
|
|
|
7
|
local $Data::Dumper::Sortkeys = 1; |
208
|
5
|
|
|
|
|
8
|
local $Data::Dumper::Terse = 1; |
209
|
5
|
|
|
|
|
14
|
Data::Dumper::Dumper($_); |
210
|
|
|
|
|
|
|
} |
211
|
|
|
|
|
|
|
: $_ |
212
|
|
|
|
|
|
|
} @_ |
213
|
|
|
|
|
|
|
); |
214
|
|
|
|
|
|
|
} |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
sub show { |
217
|
1
|
|
|
1
|
1
|
1097
|
_show(\&Test::More::note, @_); |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub always_show { |
221
|
1
|
|
|
1
|
1
|
1103
|
_show(\&Test::More::diag, @_); |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub _show { |
225
|
2
|
50
|
|
2
|
|
8
|
unless ( $DATA_DUMPER_NAMES_INSTALLED ) { |
226
|
2
|
|
|
|
|
11
|
require Carp; |
227
|
2
|
|
|
|
|
31
|
Carp::carp("Data::Dumper::Names 0.03 not found. Use explain() instead of show()"); |
228
|
2
|
|
|
|
|
698
|
goto &_explain; |
229
|
|
|
|
|
|
|
} |
230
|
0
|
|
|
|
|
0
|
my $diag = shift; |
231
|
16
|
|
|
16
|
|
112
|
no warnings 'once'; |
|
16
|
|
|
|
|
30
|
|
|
16
|
|
|
|
|
3245
|
|
232
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Indent = 1; |
233
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Sortkeys = 1; |
234
|
0
|
|
|
|
|
0
|
local $Data::Dumper::Names::UpLevel = $Data::Dumper::Names::UpLevel + 2; |
235
|
0
|
|
|
|
|
0
|
$diag->(Data::Dumper::Names::Dumper(@_)); |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub die_on_fail { |
239
|
0
|
|
|
0
|
1
|
0
|
set_failure_handler( sub { throw_failure } ); |
|
3
|
|
|
3
|
|
1137
|
|
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
sub bail_on_fail { |
243
|
|
|
|
|
|
|
set_failure_handler( |
244
|
0
|
|
|
0
|
1
|
0
|
sub { Test::More::BAIL_OUT("Test failed. BAIL OUT!.\n") } ); |
|
3
|
|
|
3
|
|
1182
|
|
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub restore_fail { |
248
|
16
|
|
|
16
|
|
111
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
38
|
|
|
16
|
|
|
|
|
2208
|
|
249
|
0
|
|
|
0
|
1
|
0
|
*Test::Builder::ok = $OK_FUNC; |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub all_done { |
253
|
1
|
|
|
1
|
1
|
1095
|
my $builder = Test::Builder->new; |
254
|
1
|
50
|
|
|
|
9
|
if ($builder->{TEST_MOST_deferred_plan}) { |
255
|
1
|
|
|
|
|
2
|
$builder->{TEST_MOST_all_done} = 1; |
256
|
1
|
50
|
|
|
|
6
|
$builder->expected_tests(@_ ? $_[0] : $builder->current_test); |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub set_failure_handler { |
262
|
6
|
|
|
6
|
1
|
13
|
my $action = shift; |
263
|
16
|
|
|
16
|
|
137
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
50
|
|
|
16
|
|
|
|
|
2989
|
|
264
|
6
|
|
|
|
|
29
|
Test::Builder->new->{TEST_MOST_failure_action} = $action; # for DESTROY |
265
|
|
|
|
|
|
|
*Test::Builder::ok = sub { |
266
|
38
|
|
|
38
|
|
97813
|
local $Test::Builder::Level = $Test::Builder::Level + 1; |
267
|
38
|
|
|
|
|
59
|
my $builder = $_[0]; |
268
|
38
|
50
|
|
|
|
98
|
if ( $builder->{TEST_MOST_test_failed} ) { |
269
|
0
|
|
|
|
|
0
|
$builder->{TEST_MOST_test_failed} = 0; |
270
|
0
|
|
|
|
|
0
|
$action->($builder); |
271
|
|
|
|
|
|
|
} |
272
|
38
|
|
|
|
|
56
|
$builder->{TEST_MOST_test_failed} = 0; |
273
|
38
|
|
|
|
|
94
|
my $result = $OK_FUNC->(@_); |
274
|
38
|
|
|
|
|
16056
|
$builder->{TEST_MOST_test_failed} = !( $builder->summary )[-1]; |
275
|
38
|
|
|
|
|
4965
|
return $result; |
276
|
6
|
|
|
|
|
83
|
}; |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
{ |
280
|
16
|
|
|
16
|
|
111
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
64
|
|
|
16
|
|
|
|
|
4170
|
|
281
|
|
|
|
|
|
|
my $orig_destroy = Test::Builder->can('DESTROY'); |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
# we need this because if the failure is on the final test, we won't have |
284
|
|
|
|
|
|
|
# a subsequent test triggering the behavior. |
285
|
|
|
|
|
|
|
*Test::Builder::DESTROY = sub { |
286
|
0
|
|
|
0
|
|
0
|
my $builder = $_[0]; |
287
|
0
|
0
|
|
|
|
0
|
if ( $builder->{TEST_MOST_test_failed} ) { |
288
|
0
|
|
0
|
0
|
|
0
|
( $builder->{TEST_MOST_failure_action} || sub {} )->(); |
289
|
|
|
|
|
|
|
} |
290
|
0
|
0
|
|
|
|
0
|
$orig_destroy->(@_) if $orig_destroy; |
291
|
|
|
|
|
|
|
}; |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub _deferred_plan_handler { |
295
|
16
|
|
|
16
|
|
77
|
my $builder = Test::Builder->new; |
296
|
16
|
50
|
66
|
|
|
490
|
if ($builder->{TEST_MOST_deferred_plan} and !$builder->{TEST_MOST_all_done}) |
297
|
|
|
|
|
|
|
{ |
298
|
0
|
|
|
|
|
|
$builder->expected_tests($builder->current_test + 1); |
299
|
|
|
|
|
|
|
} |
300
|
|
|
|
|
|
|
} |
301
|
|
|
|
|
|
|
|
302
|
|
|
|
|
|
|
# This should work because the END block defined by Test::Builder should be |
303
|
|
|
|
|
|
|
# guaranteed to be run before t one, since we use'd Test::Builder way up top. |
304
|
|
|
|
|
|
|
# The other two alternatives would be either to replace Test::Builder::_ending |
305
|
|
|
|
|
|
|
# similar to how we did Test::Builder::ok, or to call Test::Builder::no_ending |
306
|
|
|
|
|
|
|
# and basically rewrite _ending in our own image. Neither is very palatable, |
307
|
|
|
|
|
|
|
# considering _ending's initial underscore. |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
END { |
310
|
16
|
|
|
16
|
|
25681
|
_deferred_plan_handler(); |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
1; |
314
|
|
|
|
|
|
|
__END__ |