Skip to content

Commit

Permalink
chore: log
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Jul 22, 2024
1 parent 817e8da commit 37a0ca2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lua/neotest-golang/process.lua
Original file line number Diff line number Diff line change
Expand Up @@ -227,19 +227,20 @@ function M.decorate_with_go_package_and_test_name(
for _, gotestline in ipairs(gotest_output) do
if gotestline.Action == "run" and gotestline.Test ~= nil then
if gotestline.Package == golistline.ImportPath then
logger.debug({
"Match log with position",
pos_id,
gotestline.Test,
gotestline.Package,
})
local pattern = lib.convert.to_lua_pattern(folderpath)
.. lib.find.os_path_sep
.. "(.-)"
.. "/"
.. lib.convert.to_lua_pattern(gotestline.Test)
.. "$"
match = tweaked_pos_id:find(pattern, 1, false)

logger.debug({
"Match log with position",
gotestline.Test,
tweaked_pos_id,
})

if match ~= nil then
test_data.gotest_data.pkg = gotestline.Package
test_data.gotest_data.name = gotestline.Test
Expand Down

0 comments on commit 37a0ca2

Please sign in to comment.