Skip to content

Commit

Permalink
allow return value for test
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed Nov 22, 2021
1 parent 1b77404 commit ef33202
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/go/gotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ M.test_fun = function(args)
row, col = row, col + 1
local ns = require("go.ts.go").get_func_method_node_at_pos(row, col)
if ns == nil or ns == {} then
return
return false
end

utils.log("parnode" .. vim.inspect(ns))
local cmd = [[setl makeprg=go\ test\ ]] .. get_build_tags(args) .. [[-v\ -run\ ^]] .. ns.name .. [[\ ]] .. fpath
.. [[ | lua require"go.asyncmake".make()]]
utils.log("test cmd", cmd)
vim.cmd(cmd)
return true
end

M.test_file = function(args)
Expand Down

0 comments on commit ef33202

Please sign in to comment.