Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More work on html_basic.

  • Loading branch information...
commit c9480e9a2bdc1f8380628191b5cc8a0c466b0d0e 1 parent 8e395bc
Paul Johnson authored
Showing with 27 additions and 18 deletions.
  1. +1 −1  lib/Devel/Cover/DB.pm
  2. +26 −17 lib/Devel/Cover/Report/Html_basic.pm
2  lib/Devel/Cover/DB.pm
View
@@ -25,7 +25,7 @@ my $DB = "cover.12"; # Version 12 of the database.
@Devel::Cover::DB::Criteria =
(qw( statement branch path condition subroutine pod time ));
@Devel::Cover::DB::Criteria_short =
- (qw( stmt branch path cond sub pod time ));
+ (qw( stmt bran path cond sub pod time ));
sub new
{
43 lib/Devel/Cover/Report/Html_basic.pm
View
@@ -169,6 +169,7 @@ sub print_file
my $vars =
{
title => "File Coverage",
+ file => $file,
showing => \@showing,
headers => \@headers,
filenames => \%Filenames,
@@ -215,7 +216,7 @@ sub print_branches
my $vars =
{
- title => "Branch coverage report for $file",
+ file => $file,
branches => \@branches,
};
@@ -266,8 +267,8 @@ sub print_conditions
my $vars =
{
- title => "Condition coverage report for $file",
- types => \@types,
+ file => $file,
+ types => \@types,
};
# use Data::Dumper;
@@ -368,7 +369,6 @@ $Templates{summary} = <<'EOT';
</table>
<div><br></br></div>
<table>
-
<tr>
<th class="header"> file </th>
[% FOREACH header = headers %]
@@ -404,7 +404,6 @@ $Templates{summary} = <<'EOT';
[% END %]
</tr>
[% END %]
-
</table>
[% END %]
@@ -413,10 +412,20 @@ EOT
$Templates{file} = <<'EOT';
[% WRAPPER html %]
-<h1> [% title %] </h1>
+<h1> File Coverage </h1>
<table>
-
+ <tr>
+ <td class="h" align="right">File:</td>
+ <td>[% file %]</td>
+ </tr>
+ <tr>
+ <td class="h" align="right">Coverage:</td>
+ <td>[% coverage %]</td>
+ </tr>
+</table>
+<div><br></br></div>
+<table>
<tr align="RIGHT" valign="CENTER">
<th> line </th>
[% FOREACH header = headers %]
@@ -424,6 +433,13 @@ $Templates{file} = <<'EOT';
[% END %]
<th align="CENTER"> code </th>
</tr>
+ <tr align="RIGHT" valign="CENTER">
+ <td class ="h"> Total </td>
+ [% FOREACH header = headers %]
+ <td> [% header %] </td>
+ [% END %]
+ <td class="s"> [% file %] </td>
+ </tr>
[% FOREACH line = lines %]
<tr align="RIGHT" valign="CENTER">
@@ -442,7 +458,6 @@ $Templates{file} = <<'EOT';
<td class="s"> [% line.text %] </td>
</tr>
[% END %]
-
</table>
[% END %]
@@ -451,10 +466,9 @@ EOT
$Templates{branches} = <<'EOT';
[% WRAPPER html %]
-<h1> [% title %] </h1>
+<h1> Branch Coverage </h1>
<table>
-
<tr align="RIGHT" valign="CENTER">
<th> line </th>
<th> % </th>
@@ -474,7 +488,6 @@ $Templates{branches} = <<'EOT';
<td class="s"> [% branch.text %] </td>
</tr>
[% END %]
-
</table>
[% END %]
@@ -483,14 +496,12 @@ EOT
$Templates{conditions} = <<'EOT';
[% WRAPPER html %]
-<h1> [% title %] </h1>
+<h1> Condition Coverage </h1>
[% FOREACH type = types %]
-
<h2> [% type.name %] conditions </h2>
<table>
-
<tr align="RIGHT" valign="CENTER">
<th> line </th>
<th> % </th>
@@ -513,9 +524,7 @@ $Templates{conditions} = <<'EOT';
<td class="s"> [% condition.text %] </td>
</tr>
[% END %]
-
</table>
-
[% END %]
[% END %]
@@ -608,7 +617,7 @@ th,.h {
border: solid 1px #333333;
padding-left: 0.2em;
padding-right: 0.2em;
- width: 3em;
+ width: 2.5em;
}
td {
border: solid 1px #cccccc;
Please sign in to comment.
Something went wrong with that request. Please try again.