line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
########################################################################### |
3
|
|
|
|
|
|
|
# Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved. |
4
|
|
|
|
|
|
|
# Please visit http://formbuilder.org for tutorials, support, and examples. |
5
|
|
|
|
|
|
|
########################################################################### |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
package CGI::FormBuilder::Test; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
CGI::FormBuilder::Test - Test harness for FormBuilder |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use CGI::FormBuilder::Test; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $test = 1; |
18
|
|
|
|
|
|
|
for (@tests) { |
19
|
|
|
|
|
|
|
my $outfile = outfile($test++); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
9
|
|
|
9
|
|
3403
|
use strict; |
|
9
|
|
|
|
|
10
|
|
|
9
|
|
|
|
|
227
|
|
26
|
9
|
|
|
9
|
|
30
|
use warnings; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
191
|
|
27
|
9
|
|
|
9
|
|
27
|
no warnings 'uninitialized'; |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
201
|
|
28
|
|
|
|
|
|
|
|
29
|
9
|
|
|
9
|
|
29
|
use CGI::FormBuilder::Util; |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
938
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our $VERSION = '3.10'; |
33
|
|
|
|
|
|
|
our $DEBUG = 0; |
34
|
|
|
|
|
|
|
|
35
|
9
|
|
|
9
|
|
35
|
use Exporter; |
|
9
|
|
|
|
|
9
|
|
|
9
|
|
|
|
|
251
|
|
36
|
9
|
|
|
9
|
|
30
|
use base 'Exporter'; |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
777
|
|
37
|
|
|
|
|
|
|
our @EXPORT = qw(outfile); |
38
|
|
|
|
|
|
|
|
39
|
9
|
|
|
9
|
|
35
|
use File::Basename 'fileparse'; |
|
9
|
|
|
|
|
7
|
|
|
9
|
|
|
|
|
426
|
|
40
|
9
|
|
|
9
|
|
3662
|
use File::Spec::Functions; |
|
9
|
|
|
|
|
4901
|
|
|
9
|
|
|
|
|
1492
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub outfile ($) { |
43
|
84
|
|
|
84
|
0
|
2215
|
my($file, $dir) = fileparse($0); |
44
|
84
|
|
|
|
|
335
|
$file =~ s/-.*//; # just save "1a-", "3d-", etc |
45
|
84
|
|
|
|
|
691
|
my $out = catfile($dir, sprintf("$file-test%2.2d.html", $_[0])); |
46
|
84
|
50
|
|
|
|
4630
|
open(O, $out) || warn "Can't open $out: $!\n"; |
47
|
84
|
|
|
|
|
2844
|
return join '', ; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 DESCRIPTION |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 REVISION |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
$Id: Test.pm 100 2007-03-02 18:13:13Z nwiger $ |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 AUTHOR |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Copyright (c) L. All Rights Reserved. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This module is free software; you may copy this under the terms of |
63
|
|
|
|
|
|
|
the GNU General Public License, or the Artistic License, copies of |
64
|
|
|
|
|
|
|
which should have accompanied your Perl kit. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |