line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Most; |
2
|
|
|
|
|
|
|
|
3
|
17
|
|
|
17
|
|
78863
|
use warnings; |
|
16
|
|
|
|
|
103
|
|
|
16
|
|
|
|
|
494
|
|
4
|
17
|
|
|
17
|
|
74
|
use strict; |
|
17
|
|
|
|
|
23
|
|
|
17
|
|
|
|
|
336
|
|
5
|
|
|
|
|
|
|
|
6
|
17
|
|
|
17
|
|
4931
|
use Test::Most::Exception 'throw_failure'; |
|
17
|
|
|
|
|
32
|
|
|
17
|
|
|
|
|
788
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# XXX don't use 'base' as it can override signal handlers |
9
|
17
|
|
|
17
|
|
6374
|
use Test::Builder::Module; |
|
17
|
|
|
|
|
765662
|
|
|
17
|
|
|
|
|
94
|
|
10
|
|
|
|
|
|
|
our ( @ISA, @EXPORT, $DATA_DUMPER_NAMES_INSTALLED ); |
11
|
|
|
|
|
|
|
my $HAVE_TIME_HIRES; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BEGIN { |
14
|
|
|
|
|
|
|
|
15
|
17
|
|
|
17
|
|
9963
|
require Test::More; |
16
|
17
|
50
|
|
|
|
67547
|
if (Test::More->can('TB_PROVIDER_META')) { |
17
|
1
|
|
|
|
|
10
|
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
|
|
|
|
|
41
|
local @Test::More::EXPORT = grep { $_ ne 'explain' } @Test::More::EXPORT; |
|
448
|
|
|
|
|
507
|
|
23
|
16
|
|
|
|
|
71
|
Test::More->import; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
16
|
|
|
16
|
|
4044
|
eval "use Time::HiRes"; |
|
16
|
|
|
|
|
7719
|
|
|
16
|
|
|
|
|
19592
|
|
|
16
|
|
|
|
|
62
|
|
27
|
16
|
50
|
|
|
|
1645
|
$HAVE_TIME_HIRES = 1 unless $@; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
16
|
|
|
16
|
|
86
|
use Test::Builder; |
|
16
|
|
|
|
|
25
|
|
|
16
|
|
|
|
|
440
|
|
31
|
|
|
|
|
|
|
my $OK_FUNC; |
32
|
|
|
|
|
|
|
BEGIN { |
33
|
16
|
|
|
16
|
|
1584
|
$OK_FUNC = \&Test::Builder::ok; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
our $VERSION = '0.38'; |
37
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
BEGIN { |
40
|
16
|
|
|
16
|
|
322
|
@ISA = qw(Test::Builder::Module); |
41
|
|
|
|
|
|
|
@EXPORT = ( |
42
|
|
|
|
|
|
|
Test::More->can('TB_PROVIDER_META') |
43
|
16
|
50
|
|
|
|
3431
|
? 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
|
|
1173
|
my $bail_set = 0; |
63
|
|
|
|
|
|
|
|
64
|
17
|
|
|
|
|
29
|
my %modules_to_load = map { $_ => 1 } qw/ |
|
68
|
|
|
|
|
140
|
|
65
|
|
|
|
|
|
|
Test::Differences |
66
|
|
|
|
|
|
|
Test::Exception |
67
|
|
|
|
|
|
|
Test::Deep |
68
|
|
|
|
|
|
|
Test::Warn |
69
|
|
|
|
|
|
|
/; |
70
|
17
|
|
|
|
|
196
|
warnings->import; |
71
|
17
|
|
|
|
|
64
|
strict->import; |
72
|
16
|
|
|
16
|
|
2235
|
eval "use Data::Dumper::Names 0.03"; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
17
|
|
|
|
|
767
|
|
73
|
17
|
|
|
|
|
57
|
$DATA_DUMPER_NAMES_INSTALLED = !$@; |
74
|
|
|
|
|
|
|
|
75
|
17
|
100
|
|
|
|
88
|
if ( $ENV{BAIL_ON_FAIL} ) { |
76
|
1
|
|
|
|
|
1
|
$bail_set = 1; |
77
|
1
|
|
|
|
|
2
|
bail_on_fail(); |
78
|
|
|
|
|
|
|
} |
79
|
17
|
100
|
100
|
|
|
91
|
if ( !$bail_set and $ENV{DIE_ON_FAIL} ) { |
80
|
1
|
|
|
|
|
1
|
die_on_fail(); |
81
|
|
|
|
|
|
|
} |
82
|
17
|
|
|
|
|
67
|
for my $i ( 0 .. $#_ ) { |
83
|
44
|
100
|
|
|
|
97
|
if ( 'bail' eq $_[$i] ) { |
84
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
85
|
1
|
|
|
|
|
2
|
bail_on_fail(); |
86
|
1
|
|
|
|
|
2
|
$bail_set = 1; |
87
|
1
|
|
|
|
|
1
|
last; |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
} |
90
|
17
|
|
|
|
|
36
|
my $caller = caller; |
91
|
17
|
|
|
|
|
29
|
for my $i ( 0 .. $#_ ) { |
92
|
45
|
100
|
|
|
|
82
|
if ( 'timeit' eq $_[$i] ) { |
93
|
1
|
|
|
|
|
1
|
splice @_, $i, 1; |
94
|
16
|
|
|
16
|
|
99
|
no strict; |
|
16
|
|
|
|
|
22
|
|
|
16
|
|
|
|
|
5766
|
|
95
|
1
|
|
|
|
|
2
|
*{"${caller}::timeit"} = \&timeit; |
|
1
|
|
|
|
|
4
|
|
96
|
1
|
|
|
|
|
2
|
last; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
17
|
|
|
|
|
24
|
my %exclude_symbol; |
101
|
17
|
|
|
|
|
29
|
my $i = 0; |
102
|
|
|
|
|
|
|
|
103
|
17
|
|
|
|
|
22
|
foreach my $do_not_import_by_default (qw/blessed reftype/) { |
104
|
34
|
50
|
|
|
|
52
|
if ( grep { $_ eq $do_not_import_by_default } @_ ) { |
|
88
|
|
|
|
|
147
|
|
105
|
0
|
|
|
|
|
0
|
@_ = grep { $_ ne $do_not_import_by_default } @_; |
|
0
|
|
|
|
|
0
|
|
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
34
|
|
|
|
|
61
|
$exclude_symbol{$do_not_import_by_default} = 1; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
17
|
|
|
|
|
45
|
while ($i < @_) { |
113
|
52
|
100
|
100
|
|
|
128
|
if ( !$bail_set and ( 'die' eq $_[$i] ) ) { |
114
|
1
|
|
|
|
|
1
|
splice @_, $i, 1; |
115
|
1
|
|
|
|
|
2
|
die_on_fail(); |
116
|
1
|
|
|
|
|
2
|
$i = 0; |
117
|
1
|
|
|
|
|
2
|
next; |
118
|
|
|
|
|
|
|
} |
119
|
51
|
100
|
|
|
|
105
|
if ( $_[$i] =~ /^-(.*)/ ) { |
120
|
1
|
|
|
|
|
3
|
my $module = $1; |
121
|
1
|
|
|
|
|
2
|
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
|
|
|
|
|
3
|
$i = 0; |
128
|
1
|
|
|
|
|
2
|
next; |
129
|
|
|
|
|
|
|
} |
130
|
50
|
100
|
|
|
|
83
|
if ( $_[$i] =~ /^!(.*)/ ) { |
131
|
1
|
|
|
|
|
2
|
splice @_, $i, 1; |
132
|
1
|
|
|
|
|
3
|
$exclude_symbol{$1} = 1; |
133
|
1
|
|
|
|
|
1
|
$i = 0; |
134
|
1
|
|
|
|
|
2
|
next; |
135
|
|
|
|
|
|
|
} |
136
|
49
|
100
|
|
|
|
69
|
if ( 'defer_plan' eq $_[$i] ) { |
137
|
1
|
|
|
|
|
4
|
require Carp; |
138
|
1
|
50
|
|
|
|
3
|
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
|
|
|
|
|
1
|
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
|
|
|
|
|
9
|
$builder->{Have_Plan} = 1; |
150
|
1
|
|
|
|
|
1
|
$builder->{TEST_MOST_deferred_plan} = 1; |
151
|
1
|
|
|
|
|
1
|
$builder->{TEST_MOST_all_done} = 0; |
152
|
1
|
|
|
|
|
1
|
$i = 0; |
153
|
1
|
|
|
|
|
2
|
next; |
154
|
|
|
|
|
|
|
} |
155
|
48
|
|
|
|
|
72
|
$i++; |
156
|
|
|
|
|
|
|
} |
157
|
17
|
|
|
|
|
46
|
foreach my $module (keys %modules_to_load) { |
158
|
16
|
|
|
16
|
|
7381
|
eval "use $module"; |
|
16
|
|
|
16
|
|
87725
|
|
|
16
|
|
|
16
|
|
382
|
|
|
16
|
|
|
15
|
|
7613
|
|
|
16
|
|
|
|
|
121643
|
|
|
16
|
|
|
|
|
489
|
|
|
16
|
|
|
|
|
7585
|
|
|
16
|
|
|
|
|
166161
|
|
|
16
|
|
|
|
|
575
|
|
|
15
|
|
|
|
|
6827
|
|
|
15
|
|
|
|
|
70528
|
|
|
15
|
|
|
|
|
172
|
|
|
67
|
|
|
|
|
3046
|
|
159
|
|
|
|
|
|
|
|
160
|
67
|
50
|
|
|
|
5947
|
if ( my $error = $@) { |
161
|
0
|
|
|
|
|
0
|
require Carp; |
162
|
0
|
|
|
|
|
0
|
Carp::croak($error); |
163
|
|
|
|
|
|
|
} |
164
|
16
|
|
|
16
|
|
104
|
no strict 'refs'; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
5371
|
|
165
|
|
|
|
|
|
|
# Note: export_to_level would be better here. |
166
|
67
|
|
|
|
|
112
|
push @EXPORT => grep { !$exclude_symbol{$_} } @{"${module}::EXPORT"}; |
|
1084
|
|
|
|
|
1423
|
|
|
67
|
|
|
|
|
199
|
|
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
# 'magic' goto to avoid updating the callstack |
170
|
17
|
|
|
|
|
126
|
goto &Test::Builder::Module::import; |
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub explain { |
174
|
6
|
|
|
6
|
1
|
11421
|
_explain(\&Test::More::note, @_); |
175
|
|
|
|
|
|
|
} |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
sub timeit(&;$) { |
179
|
2
|
|
|
2
|
1
|
1246
|
my ( $code, $message ) = @_; |
180
|
2
|
50
|
|
|
|
5
|
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
|
|
|
|
|
3
|
my ( $package, $filename, $line ) = caller; |
186
|
1
|
|
|
|
|
4
|
$message = "$filename line $line"; |
187
|
|
|
|
|
|
|
} |
188
|
2
|
|
|
|
|
6
|
my $start = [Time::HiRes::gettimeofday()]; |
189
|
2
|
|
|
|
|
6
|
$code->(); |
190
|
2
|
|
|
|
|
671
|
explain( |
191
|
|
|
|
|
|
|
sprintf "$message: took %s seconds" => Time::HiRes::tv_interval($start) ); |
192
|
|
|
|
|
|
|
} |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
sub always_explain { |
195
|
2
|
|
|
2
|
1
|
2237
|
_explain(\&Test::More::diag, @_); |
196
|
|
|
|
|
|
|
} |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
sub _explain { |
199
|
10
|
|
|
10
|
|
23
|
my $diag = shift; |
200
|
16
|
|
|
16
|
|
110
|
no warnings 'once'; |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
3460
|
|
201
|
|
|
|
|
|
|
$diag->( |
202
|
|
|
|
|
|
|
map { |
203
|
10
|
|
|
|
|
19
|
ref $_ |
204
|
14
|
100
|
|
|
|
140
|
? do { |
205
|
5
|
|
|
|
|
27
|
require Data::Dumper; |
206
|
5
|
|
|
|
|
9
|
local $Data::Dumper::Indent = 1; |
207
|
5
|
|
|
|
|
6
|
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
|
1079
|
_show(\&Test::More::note, @_); |
218
|
|
|
|
|
|
|
} |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
sub always_show { |
221
|
1
|
|
|
1
|
1
|
1063
|
_show(\&Test::More::diag, @_); |
222
|
|
|
|
|
|
|
} |
223
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
sub _show { |
225
|
2
|
50
|
|
2
|
|
8
|
unless ( $DATA_DUMPER_NAMES_INSTALLED ) { |
226
|
2
|
|
|
|
|
10
|
require Carp; |
227
|
2
|
|
|
|
|
32
|
Carp::carp("Data::Dumper::Names 0.03 not found. Use explain() instead of show()"); |
228
|
2
|
|
|
|
|
756
|
goto &_explain; |
229
|
|
|
|
|
|
|
} |
230
|
0
|
|
|
|
|
0
|
my $diag = shift; |
231
|
16
|
|
|
16
|
|
98
|
no warnings 'once'; |
|
16
|
|
|
|
|
34
|
|
|
16
|
|
|
|
|
2767
|
|
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
|
|
980
|
|
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
|
|
1519
|
|
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub restore_fail { |
248
|
16
|
|
|
16
|
|
105
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
28
|
|
|
16
|
|
|
|
|
1951
|
|
249
|
0
|
|
|
0
|
1
|
0
|
*Test::Builder::ok = $OK_FUNC; |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
sub all_done { |
253
|
1
|
|
|
1
|
1
|
864
|
my $builder = Test::Builder->new; |
254
|
1
|
50
|
|
|
|
8
|
if ($builder->{TEST_MOST_deferred_plan}) { |
255
|
1
|
|
|
|
|
1
|
$builder->{TEST_MOST_all_done} = 1; |
256
|
1
|
50
|
|
|
|
4
|
$builder->expected_tests(@_ ? $_[0] : $builder->current_test); |
257
|
|
|
|
|
|
|
} |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
sub set_failure_handler { |
262
|
6
|
|
|
6
|
1
|
12
|
my $action = shift; |
263
|
16
|
|
|
16
|
|
119
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
36
|
|
|
16
|
|
|
|
|
2410
|
|
264
|
6
|
|
|
|
|
20
|
Test::Builder->new->{TEST_MOST_failure_action} = $action; # for DESTROY |
265
|
|
|
|
|
|
|
*Test::Builder::ok = sub { |
266
|
38
|
|
|
38
|
|
79496
|
local $Test::Builder::Level = $Test::Builder::Level + 1; |
267
|
38
|
|
|
|
|
42
|
my $builder = $_[0]; |
268
|
38
|
50
|
|
|
|
86
|
if ( $builder->{TEST_MOST_test_failed} ) { |
269
|
0
|
|
|
|
|
0
|
$builder->{TEST_MOST_test_failed} = 0; |
270
|
0
|
|
|
|
|
0
|
$action->($builder); |
271
|
|
|
|
|
|
|
} |
272
|
38
|
|
|
|
|
46
|
$builder->{TEST_MOST_test_failed} = 0; |
273
|
38
|
|
|
|
|
88
|
my $result = $OK_FUNC->(@_); |
274
|
38
|
|
|
|
|
13943
|
$builder->{TEST_MOST_test_failed} = !( $builder->summary )[-1]; |
275
|
38
|
|
|
|
|
4353
|
return $result; |
276
|
6
|
|
|
|
|
67
|
}; |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
{ |
280
|
16
|
|
|
16
|
|
99
|
no warnings 'redefine'; |
|
16
|
|
|
|
|
40
|
|
|
16
|
|
|
|
|
3985
|
|
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
|
|
68
|
my $builder = Test::Builder->new; |
296
|
16
|
50
|
66
|
|
|
407
|
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
|
|
24042
|
_deferred_plan_handler(); |
311
|
|
|
|
|
|
|
} |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
1; |
314
|
|
|
|
|
|
|
__END__ |