Fixes GH issue #118 "Division by zero when there are no relevant expressions"

Fixed by showing 100% coverage in that case (100% is what coveralls.io shows when there are no relevant lines).
This commit is contained in:
Georges Dupéron 2016-03-23 17:46:10 +01:00
parent 7a5e12cd42
commit 835c9f8cdd

View File

@ -151,7 +151,7 @@
(meta ([charset "utf-8"]))
(link ([rel "stylesheet"] [type "text/css"] [href ,(string-append assets-path "main.css")])))
(body ()
,(%s->xexpr (/ covered total))
,(%s->xexpr (if (= total 0) 1 (/ covered total)))
(div ([class "code"]) ,(file->html path covered?)))))
(define (%s->xexpr %)