Software /
code /
prosody
Comparison
tests/test.lua @ 3540:bc139431830b
Monster whitespace commit (beware the whitespace monster).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 16 Oct 2010 23:00:42 +0500 |
parent | 3406:748246005893 |
child | 4339:63304d323983 |
comparison
equal
deleted
inserted
replaced
3539:8bbd965267b2 | 3540:bc139431830b |
---|---|
215 local total_active_lines = 0; | 215 local total_active_lines = 0; |
216 local coverage_file = io.open("reports/coverage_"..fn:gsub("%W+", "_")..".report", "a+"); | 216 local coverage_file = io.open("reports/coverage_"..fn:gsub("%W+", "_")..".report", "a+"); |
217 for line, active in pairs(lines_hit) do | 217 for line, active in pairs(lines_hit) do |
218 if active ~= nil then total_active_lines = total_active_lines + 1; end | 218 if active ~= nil then total_active_lines = total_active_lines + 1; end |
219 if coverage_file then | 219 if coverage_file then |
220 if active == false then coverage_file:write(fn, "|", line, "|", name or "", "|miss\n"); | 220 if active == false then coverage_file:write(fn, "|", line, "|", name or "", "|miss\n"); |
221 else coverage_file:write(fn, "|", line, "|", name or "", "|", tostring(success), "\n"); end | 221 else coverage_file:write(fn, "|", line, "|", name or "", "|", tostring(success), "\n"); end |
222 end | 222 end |
223 end | 223 end |
224 if coverage_file then coverage_file:close(); end | 224 if coverage_file then coverage_file:close(); end |
225 return covered_lines, total_active_lines, lines_hit; | 225 return covered_lines, total_active_lines, lines_hit; |