pull/392/head
ray-x 8 months ago
parent e4e1e4cf40
commit 08ec2704f1

@ -2,9 +2,6 @@ local _ = require('plenary/busted')
local eq = assert.are.same
local cur_dir = vim.fn.expand('%:p:h')
-- local status = require("plenary.reload").reload_module("go.nvim")
-- status = require("plenary.reload").reload_module("nvim-treesitter")
-- local ulog = require('go.utils').log
describe('should run fillstruct', function()
vim.cmd([[packadd go.nvim]])
@ -33,14 +30,10 @@ describe('should run fillstruct', function()
require('go.reftool').fillstruct()
vim.cmd('sleep 500m') -- allow cleanup
vim.wait(100, function()
local filled = vim.api.nvim_buf_get_lines(0, 0, 40, false)
vim.cmd('write')
local filled = vim.api.nvim_buf_get_lines(0, 0, 40, false)
-- local path = cur_dir .. "/lua/tests/fixtures/fill/fill_struct_input.go2" -- %:p:h ? %:p
-- vim.fn.writefile(filled, path)
filled = vim.fn.join(filled, '\n')
eq(expected, filled)
end)
filled = vim.fn.join(filled, '\n')
eq(expected, filled)
end)
end)

Loading…
Cancel
Save