refactor(gotests): use vim.system

This commit is contained in:
Oleksandr Smirnov 2025-02-28 14:39:13 +02:00
parent ec91e6efcc
commit f4e20f1a51
No known key found for this signature in database

View file

@ -67,16 +67,12 @@ local function add_test(args)
log.debug("generating tests with args: ", args) log.debug("generating tests with args: ", args)
return r.sync(c.commands.gotests, { local rs = r.sync { c.commands.gotests, unpack(args) }
args = args, if rs.code ~= 0 then
on_exit = function(data, status) error("gotests failed: " .. rs.stderr)
if not status == 0 then end
error("gotests failed: " .. data)
end
u.notify "unit test(s) generated" u.notify "unit test(s) generated"
end,
})
end end
-- generate unit test for one function -- generate unit test for one function