line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# This file is part of Test-Apocalypse |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# This software is copyright (c) 2014 by Apocalypse. |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
7
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
8
|
|
|
|
|
|
|
# |
9
|
39
|
|
|
39
|
|
13276051
|
use strict; use warnings; |
|
39
|
|
|
39
|
|
89
|
|
|
39
|
|
|
|
|
1177
|
|
|
39
|
|
|
|
|
161
|
|
|
39
|
|
|
|
|
81
|
|
|
39
|
|
|
|
|
1948
|
|
10
|
|
|
|
|
|
|
package Test::Apocalypse::Script; |
11
|
|
|
|
|
|
|
$Test::Apocalypse::Script::VERSION = '1.003'; |
12
|
|
|
|
|
|
|
BEGIN { |
13
|
39
|
|
|
39
|
|
544
|
$Test::Apocalypse::Script::AUTHORITY = 'cpan:APOCAL'; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# ABSTRACT: Plugin for Test::Script |
17
|
|
|
|
|
|
|
|
18
|
39
|
|
|
39
|
|
157
|
use Test::More; |
|
39
|
|
|
|
|
176
|
|
|
39
|
|
|
|
|
273
|
|
19
|
39
|
|
|
39
|
|
25198
|
use Test::Script 1.07; |
|
39
|
|
|
|
|
111420
|
|
|
39
|
|
|
|
|
157
|
|
20
|
39
|
|
|
39
|
|
8859
|
use File::Find::Rule 0.32; |
|
39
|
|
|
|
|
7695
|
|
|
39
|
|
|
|
|
271
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub do_test { |
23
|
|
|
|
|
|
|
# TODO we need to search more locations/extensions/etc? |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# TODO Stupid FFR complains if the dir doesn't exist?!? |
26
|
38
|
|
|
38
|
0
|
76
|
my @dirs; |
27
|
38
|
|
|
|
|
114
|
foreach my $d ( qw( examples bin scripts ) ) { |
28
|
114
|
100
|
|
|
|
950
|
push @dirs, $d if -d $d; |
29
|
|
|
|
|
|
|
} |
30
|
38
|
|
|
|
|
1368
|
my @files = File::Find::Rule->file->name( qr/\.pl$/ )->in( @dirs ); |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# Skip if no scripts |
33
|
38
|
50
|
|
|
|
27322
|
if ( ! scalar @files ) { |
34
|
0
|
|
|
|
|
0
|
plan skip_all => 'No script files found in the distribution'; |
35
|
|
|
|
|
|
|
} else { |
36
|
38
|
|
|
|
|
190
|
plan tests => scalar @files; |
37
|
38
|
|
|
|
|
7068
|
foreach my $f ( @files ) { |
38
|
38
|
|
|
|
|
304
|
script_compiles( $f ); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
38
|
|
|
|
|
2093192
|
return; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=for :stopwords Apocalypse Niebur Ryan |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=for Pod::Coverage do_test |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 NAME |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Test::Apocalypse::Script - Plugin for Test::Script |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 VERSION |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This document describes v1.003 of Test::Apocalypse::Script - released October 24, 2014 as part of Test-Apocalypse. |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 DESCRIPTION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Encapsulates L<Test::Script> functionality. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SEE ALSO |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Please see those modules/websites for more information related to this module. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=over 4 |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=item * |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
L<Test::Apocalypse|Test::Apocalypse> |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=back |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Apocalypse <APOCAL@cpan.org> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This software is copyright (c) 2014 by Apocalypse. |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
90
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The full text of the license can be found in the |
93
|
|
|
|
|
|
|
F<LICENSE> file included with this distribution. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTY |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY |
98
|
|
|
|
|
|
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT |
99
|
|
|
|
|
|
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY |
100
|
|
|
|
|
|
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, |
101
|
|
|
|
|
|
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
102
|
|
|
|
|
|
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM |
103
|
|
|
|
|
|
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF |
104
|
|
|
|
|
|
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION. |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
107
|
|
|
|
|
|
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS |
108
|
|
|
|
|
|
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY |
109
|
|
|
|
|
|
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE |
110
|
|
|
|
|
|
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF |
111
|
|
|
|
|
|
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD |
112
|
|
|
|
|
|
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), |
113
|
|
|
|
|
|
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
114
|
|
|
|
|
|
|
SUCH DAMAGES. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |