Browse Source

build: Print an actual newline instead of a literal \n in lcov output

Guillem Jover 7 years ago
parent
commit
ca9b5c6511
2 changed files with 2 additions and 1 deletions
  1. 1 0
      debian/changelog
  2. 1 1
      doc/lcov-inject.pl

+ 1 - 0
debian/changelog

@@ -26,6 +26,7 @@ dpkg (1.18.11) UNRELEASED; urgency=medium
     - Use builddir instead of CURDIR in man Makefile.am.
     - Use cp with -R instead of -r (the former is more portable and not
       marked as deprecated by POSIX).
+    - Print an actual newline instead of a literal \n in lcov output.
 
   [ Updated manpages translations ]
   * German (Helge Kreutzmann).

+ 1 - 1
doc/lcov-inject.pl

@@ -90,7 +90,7 @@ sub box_rating {
 sub box_html {
     my ($stats) = @_;
 
-    return sprintf '<td class="coverPer%s">%.1f&nbsp;%%</td>\n' .
+    return sprintf '<td class="coverPer%s">%.1f&nbsp;%%</td>' . "\n" .
                    '<td class="coverNum%s">%d / %d</td>',
         box_rating($stats->{percentage}), $stats->{percentage},
         box_rating($stats->{percentage}), $stats->{covered}, $stats->{total};