fix: use strict test function name while debugging
This commit is contained in:
parent
4c29904246
commit
f47dd66c50
@ -458,7 +458,7 @@ M.run = function(...)
|
||||
dap_cfg.program = sep .. "${relativeFileDirname}"
|
||||
|
||||
if testfunc then
|
||||
dap_cfg.args = { "-test.run", "^" .. testfunc.name .."$" }
|
||||
dap_cfg.args = { "-test.run", "^" .. testfunc.name .. "$" }
|
||||
end
|
||||
dap.configurations.go = { dap_cfg }
|
||||
dap.continue()
|
||||
@ -472,7 +472,7 @@ M.run = function(...)
|
||||
dap_cfg.request = "launch"
|
||||
dap_cfg.program = sep .. "${relativeFileDirname}"
|
||||
if not empty(ns) then
|
||||
dap_cfg.args = { "-test.run", "^" .. ns.name .."$" }
|
||||
dap_cfg.args = { "-test.run", "^" .. ns.name }
|
||||
end
|
||||
dap.configurations.go = { dap_cfg }
|
||||
dap.continue()
|
||||
@ -496,7 +496,7 @@ M.run = function(...)
|
||||
dap_cfg.mode = "debug"
|
||||
dap_cfg.request = "launch"
|
||||
if testfunc then
|
||||
dap_cfg.args = { "-test.run", "^" .. testfunc.name .."$" }
|
||||
dap_cfg.args = { "-test.run", "^" .. testfunc.name .. "$" }
|
||||
dap_cfg.mode = "test"
|
||||
end
|
||||
dap_cfg.program = sep .. "${relativeFileDirname}"
|
||||
@ -567,7 +567,7 @@ local unmap = function()
|
||||
local mode = v.mode
|
||||
local desc = v.desc or "go-dap"
|
||||
if v.mode == " " then
|
||||
mode = {'n', 'v'}
|
||||
mode = { 'n', 'v' }
|
||||
end
|
||||
|
||||
log(v)
|
||||
|
Loading…
Reference in New Issue
Block a user