|
|
|
@ -79,7 +79,6 @@ M.get_build_tags = function(args, tbl)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local optarg, _, reminder = getopt.get_opts(args, short_opts, long_opts)
|
|
|
|
|
log('build tags', optarg, reminder)
|
|
|
|
|
if optarg['t'] then
|
|
|
|
|
table.insert(tags, optarg['t'])
|
|
|
|
|
end
|
|
|
|
@ -93,6 +92,8 @@ M.get_build_tags = function(args, tbl)
|
|
|
|
|
if _GO_NVIM_CFG.test_runner == 'dlv' then
|
|
|
|
|
t = '--build-flags'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
log('build tags', tags, args, optarg, reminder)
|
|
|
|
|
if #tags > 0 then
|
|
|
|
|
if tbl then
|
|
|
|
|
return { t, table.concat(tags, ',') }, reminder, optarg
|
|
|
|
@ -423,7 +424,6 @@ M.get_testcase_name = function()
|
|
|
|
|
return nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function format_test_name(name)
|
|
|
|
|
name = name:gsub('"', '')
|
|
|
|
|
|
|
|
|
@ -456,7 +456,7 @@ local function run_tests_with_ts_node(args, func_node, tblcase_ns)
|
|
|
|
|
local test_name_path = format_test_name(func_node.name)
|
|
|
|
|
|
|
|
|
|
if tblcase_ns then
|
|
|
|
|
test_name_path = test_name_path .. "/" .. format_test_name(tblcase_ns)
|
|
|
|
|
test_name_path = test_name_path .. '/' .. format_test_name(tblcase_ns)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if func_node.name:find('Bench') then
|
|
|
|
@ -478,7 +478,7 @@ local function run_tests_with_ts_node(args, func_node, tblcase_ns)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if test_runner == 'dlv' then
|
|
|
|
|
local runflag = string.format("-test.run=%s", test_name_path)
|
|
|
|
|
local runflag = string.format('-test.run=%s', test_name_path)
|
|
|
|
|
table.insert(cmd, 3, fpath)
|
|
|
|
|
table.insert(cmd, '--')
|
|
|
|
|
table.insert(cmd, runflag)
|
|
|
|
|