Skip to content

Commit 3fed389

Browse files
use source instead of short_src to handle longer filenames
1 parent 3a68578 commit 3fed389

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

coverage.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ local function start(testname)
5151
local getinfo = debug.getinfo
5252
local sub = string.sub
5353
debug.sethook(function(event,line)
54-
local s = getinfo(2,"S").short_src
54+
local s = getinfo(2,"S").source
5555
-- startup logging gets all the serpent loads of `global`
5656
-- serpent itself will also always show up as one of these
57-
if sub(s,1,7) == "[string" then return end
57+
if sub(s,1,1) ~= "@" then
58+
return
59+
else
60+
s = sub(s,2)
61+
end
5862
local fileinfo = test[s]
5963
if not fileinfo then
6064
fileinfo = {}

0 commit comments

Comments
 (0)