aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tools/src/cover.erl
diff options
context:
space:
mode:
authorYuki Ito <[email protected]>2015-07-06 05:46:31 +0900
committerSiri Hansen <[email protected]>2015-09-09 15:57:59 +0200
commit1a1deb03240e7b1f738b8bc0fb172e6ae8e7061d (patch)
treed9fc5242313affefbb47e243d58eee24c439e992 /lib/tools/src/cover.erl
parent439de942a4db2a422dbfe7813f66b150f947313f (diff)
downloadotp-1a1deb03240e7b1f738b8bc0fb172e6ae8e7061d.tar.gz
otp-1a1deb03240e7b1f738b8bc0fb172e6ae8e7061d.tar.bz2
otp-1a1deb03240e7b1f738b8bc0fb172e6ae8e7061d.zip
Fix cover output file
This is introduced by ab435488a. If a module includes lines which are less than 1, for example a module which includes `eunit.hrl`, its cover output file misses the coverage lines.
Diffstat (limited to 'lib/tools/src/cover.erl')
-rw-r--r--lib/tools/src/cover.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index 8d1cb96504..366d6bcbd9 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -2437,7 +2437,7 @@ do_analyse_to_file1(Module, OutFile, ErlFile, HTML) ->
"\n\n"]),
Pattern = {#bump{module=Module,line='$1',_='_'},'$2'},
- MS = [{Pattern,[],[{{'$1','$2'}}]}],
+ MS = [{Pattern,[{is_integer,'$1'},{'>','$1',0}],[{{'$1','$2'}}]}],
CovLines = lists:keysort(1,ets:select(?COLLECTION_TABLE, MS)),
print_lines(Module, CovLines, InFd, OutFd, 1, HTML),