From 420987848be14b130f84328d087c9062731adb4c Mon Sep 17 00:00:00 2001 From: ray-x Date: Sat, 9 Mar 2024 19:18:43 +1100 Subject: [PATCH] fillstruct --- lua/tests/go_fillstruct_spec.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/tests/go_fillstruct_spec.lua b/lua/tests/go_fillstruct_spec.lua index 2a5bc18..ced3df3 100644 --- a/lua/tests/go_fillstruct_spec.lua +++ b/lua/tests/go_fillstruct_spec.lua @@ -24,22 +24,24 @@ describe('should run fillstruct', function() require('plenary.reload').reload_module('go.nvim') require('go').setup({ verbose = true, lsp_cfg = true }) - vim.cmd('sleep 1500m') -- allow gopls startup + vim.cmd('sleep 2000m') -- allow gopls startup vim.fn.setpos('.', { 0, 20, 14, 0 }) require('go.reftool').fillstruct() local filled - for _ = 1, 6 do + for _ = 1, 8 do require('go.utils').log('waiting for fill') - vim.wait(1000, function() return false end) + vim.wait(500, function() return false end) filled = vim.api.nvim_buf_get_lines(0, 0, 40, false) filled = vim.fn.join(filled, '\n') require('go.utils').log(vim.inspect(filled)) if expected == filled then - break + eq(true, true) + return end + require('go.reftool').fillstruct() end eq(expected, filled)