pull/427/head
ray-x 4 months ago
parent 8bbf2414de
commit a765508e2e

@ -69,7 +69,7 @@ describe('should run gopls releated functions', function()
local fmt local fmt
require('go.utils').log('waiting for import') require('go.utils').log('waiting for import')
vim.cmd([[wa]]) vim.cmd([[wa]])
vim.wait(2000, function() local success = vim.wait(2000, function()
fmt = vim.fn.join(vim.fn.readfile(path), '\n') fmt = vim.fn.join(vim.fn.readfile(path), '\n')
require('go.utils').log(vim.inspect(fmt)) require('go.utils').log(vim.inspect(fmt))
if expected == fmt then if expected == fmt then
@ -77,11 +77,11 @@ describe('should run gopls releated functions', function()
end end
return false return false
end, 200) end, 200)
if expected == fmt then if success then
eq(1, 1) eq(1, 1)
return else
eq(expected, fmt)
end end
eq(1, 1) -- still not working
cmd = 'bd! ' .. path cmd = 'bd! ' .. path
vim.cmd(cmd) vim.cmd(cmd)
end) end)

Loading…
Cancel
Save