line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Run::CmdLine::Plugin::ColorSummary; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1269
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
119
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 NAME |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
Test::Run::CmdLine::Plugin::ColorSummary - Color the summary in Test::Run::CmdLine. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our $VERSION = '0.0203'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head2 $self->private_backend_plugins() |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Returns the Backend Plugins as specified by this plugin. See |
17
|
|
|
|
|
|
|
L<Test::Run::CmdLine> for more information. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub private_backend_plugins |
22
|
|
|
|
|
|
|
{ |
23
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return [qw(ColorSummary)]; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head2 $self->private_direct_backend_env_mapping() |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Returns the HARNESS_SUMMARY_COLOR_FAIL and HARNESS_SUMMARY_COLOR_SUCCESS |
31
|
|
|
|
|
|
|
environment variables. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=cut |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub private_direct_backend_env_mapping |
36
|
|
|
|
|
|
|
{ |
37
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
return [ |
39
|
|
|
|
|
|
|
{ |
40
|
0
|
|
|
|
|
|
'env' => "HARNESS_SUMMARY_COLOR_SUCCESS", |
41
|
|
|
|
|
|
|
'arg' => "summary_color_success", |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
{ |
44
|
|
|
|
|
|
|
'env' => "HARNESS_SUMMARY_COLOR_FAIL", |
45
|
|
|
|
|
|
|
'arg' => "summary_color_failure", |
46
|
|
|
|
|
|
|
}, |
47
|
|
|
|
|
|
|
]; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 SYNOPSIS |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This plug-in colors the summary line in Test::Run::CmdLine. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 ENVIRONMENT VARIABLES |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This module accepts the followinge environment variables: |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=over 4 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item HARNESS_SUMMARY_COLOR_SUCCESS |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
This specifies the Term::ANSIColor color for the success line. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=item HARNESS_SUMMARY_COLOR_FAIL |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This specifies the Term::ANSIColor color for the failure line |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=back |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 AUTHOR |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Shlomi Fish, L<http://www.shlomifish.org/> . |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 BUGS |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Please report any bugs or feature requests to |
77
|
|
|
|
|
|
|
C<bug-test-run-cmdline-plugin-colorsummary@rt.cpan.org>, or through the web interface at |
78
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Run-CmdLine-Plugin-ColorSummary>. |
79
|
|
|
|
|
|
|
I will be notified, and then you'll automatically be notified of progress on |
80
|
|
|
|
|
|
|
your bug as I make changes. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 SUPPORT |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
perldoc Test::Run::CmdLine::Plugin::ColorSummary |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
You can also look for information at: |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=over 4 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test::Run::CmdLine::Plugin::ColorSummary> |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item * Search CPAN |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
L<http://search.cpan.org/dist/Test::Run::CmdLine::Plugin::ColorSummary/> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=back |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 SOURCE AVAILABILITY |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The latest source of Test::Run::CmdLine::Plugin::ColorSummary is available from the |
105
|
|
|
|
|
|
|
Test::Run BerliOS Subversion repository: |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
L<https://svn.berlios.de/svnroot/repos/web-cpan/Test-Harness-NG/> |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head1 SEE ALSO |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
L<Test::Run::Obj>, L<Term::ANSIColor>, |
112
|
|
|
|
|
|
|
L<Test::Run::Plugin::ColorSummary>. |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Copyright 2006 Shlomi Fish, all rights reserved. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
This program is released under the following license: MIT X11. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
1; |