line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
2
|
|
|
|
|
|
|
# $URL$ |
3
|
|
|
|
|
|
|
# $Date$ |
4
|
|
|
|
|
|
|
# $Author$ |
5
|
|
|
|
|
|
|
# $Revision$ |
6
|
|
|
|
|
|
|
#------------------------------------------------------------------------------- |
7
|
|
|
|
|
|
|
package Wetware::Test::CreateTestSuite::TestSuite; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
1087
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
10
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
11
|
1
|
|
|
1
|
|
826
|
use Wetware::Test::Suite; |
|
1
|
|
|
|
|
11682
|
|
|
1
|
|
|
|
|
33
|
|
12
|
1
|
|
|
1
|
|
9
|
use base q{Wetware::Test::Suite}; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
70
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
461
|
use Test::Differences qw(); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Test::More; |
16
|
|
|
|
|
|
|
use Wetware::Test::CreateTestSuite; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub class_under_test { return 'Wetware::Test::CreateTestSuite'; } |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub test_new : Test(1) { |
25
|
|
|
|
|
|
|
my $self = shift; |
26
|
|
|
|
|
|
|
my $object = $self->object_under_test(); |
27
|
|
|
|
|
|
|
my $expected_class = $self->class_under_test(); |
28
|
|
|
|
|
|
|
Test::More::isa_ok( $object, $expected_class ); |
29
|
|
|
|
|
|
|
return $self; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub test_run : Test(1) { |
35
|
|
|
|
|
|
|
my $self = shift; |
36
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
37
|
|
|
|
|
|
|
Test::More::can_ok($class, 'run'); |
38
|
|
|
|
|
|
|
return $self; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub test_find_pm : Test(1) { |
43
|
|
|
|
|
|
|
my $self = shift; |
44
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
45
|
|
|
|
|
|
|
Test::More::can_ok($class, 'find_pm'); |
46
|
|
|
|
|
|
|
return $self; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub test_is_testsuite : Test(1) { |
51
|
|
|
|
|
|
|
my $self = shift; |
52
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
53
|
|
|
|
|
|
|
Test::More::can_ok($class, 'is_testsuite'); |
54
|
|
|
|
|
|
|
return $self; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub test_has_testsuite : Test(1) { |
59
|
|
|
|
|
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
61
|
|
|
|
|
|
|
Test::More::can_ok($class, 'has_testsuite'); |
62
|
|
|
|
|
|
|
return $self; |
63
|
|
|
|
|
|
|
} |
64
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub test_parse_pm_file : Test(1) { |
67
|
|
|
|
|
|
|
my $self = shift; |
68
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
69
|
|
|
|
|
|
|
Test::More::can_ok($class, 'parse_pm_file'); |
70
|
|
|
|
|
|
|
return $self; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub test_write_testsuites_for : Test(1) { |
75
|
|
|
|
|
|
|
my $self = shift; |
76
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
77
|
|
|
|
|
|
|
Test::More::can_ok($class, 'write_testsuites_for'); |
78
|
|
|
|
|
|
|
return $self; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub test_write_t_dir_files : Test(1) { |
83
|
|
|
|
|
|
|
my $self = shift; |
84
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
85
|
|
|
|
|
|
|
Test::More::can_ok($class, 'write_t_dir_files'); |
86
|
|
|
|
|
|
|
return $self; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub test_content_for_test_class_t : Test(1) { |
91
|
|
|
|
|
|
|
my $self = shift; |
92
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
93
|
|
|
|
|
|
|
Test::More::can_ok($class, 'content_for_test_class_t'); |
94
|
|
|
|
|
|
|
return $self; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
sub test_content_for_compile_pm_t : Test(1) { |
99
|
|
|
|
|
|
|
my $self = shift; |
100
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
101
|
|
|
|
|
|
|
Test::More::can_ok($class, 'content_for_compile_pm_t'); |
102
|
|
|
|
|
|
|
return $self; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub test_content_for_pod_coverage_t : Test(1) { |
107
|
|
|
|
|
|
|
my $self = shift; |
108
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
109
|
|
|
|
|
|
|
Test::More::can_ok($class, 'content_for_pod_coverage_t'); |
110
|
|
|
|
|
|
|
return $self; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub test_search_dir : Test(1) { |
115
|
|
|
|
|
|
|
my $self = shift; |
116
|
|
|
|
|
|
|
my $object = $self->object_under_test(); |
117
|
|
|
|
|
|
|
my $expected = q{./lib}; |
118
|
|
|
|
|
|
|
my $got = $object->search_dir(); |
119
|
|
|
|
|
|
|
Test::More::is($got,$expected, 'search_dir'); |
120
|
|
|
|
|
|
|
return $self; |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
sub test_t_dir : Test(1) { |
125
|
|
|
|
|
|
|
my $self = shift; |
126
|
|
|
|
|
|
|
my $object = $self->object_under_test(); |
127
|
|
|
|
|
|
|
my $expected = q{./t}; |
128
|
|
|
|
|
|
|
my $got = $object->t_dir(); |
129
|
|
|
|
|
|
|
Test::More::is($got,$expected, 't_dir'); |
130
|
|
|
|
|
|
|
return $self; |
131
|
|
|
|
|
|
|
} |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub test_overwrite_t_files : Test(1) { |
136
|
|
|
|
|
|
|
my $self = shift; |
137
|
|
|
|
|
|
|
my $class = $self->class_under_test(); |
138
|
|
|
|
|
|
|
Test::More::can_ok($class, 'overwrite_t_files'); |
139
|
|
|
|
|
|
|
return $self; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
# sub test_new_method_name : Test(1) { |
145
|
|
|
|
|
|
|
# my $self = shift; |
146
|
|
|
|
|
|
|
# my $class = $self->class_under_test(); |
147
|
|
|
|
|
|
|
# Test::More::can_ok($class, 'new_method_name'); |
148
|
|
|
|
|
|
|
# return $self; |
149
|
|
|
|
|
|
|
# } |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
#----------------------------------------------------------------------------- |
152
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
1; |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
__END__ |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
=pod |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
=head1 NAME |
160
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
Wetware::Test::CreateTestSuite::TestSuite - The CLI Test::Class |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
=head1 SYNOPSIS |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
This requires Wetware::Test distribution. It provides the basic |
166
|
|
|
|
|
|
|
testing of the Modules. |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 OVERRIDDEN ETHODS |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head2 class_under_test() |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 TEST METHODS |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
We use the naming convention I<test_METHODNAME> for test methods. |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head2 test_get_options() |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=head2 test_help_or_pod() |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head2 test_new() |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=head2 test_option_defaults() |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head2 test_option_specifications() |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
=head2 test_required_settings() |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head2 test_verify_required_options() |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head2 test_verify_required_options() |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head2 test_remaining_argv() |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
Copyright 2009 "drieux", all rights reserved. |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
199
|
|
|
|
|
|
|
under the same terms as Perl itself. |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
# End of Wetware::CLI |