chore: style and lint

This commit is contained in:
Michael Paulson 2023-12-01 13:45:22 -07:00
parent 23fb0002cf
commit 689778b3aa
2 changed files with 15 additions and 12 deletions

View File

@ -94,17 +94,20 @@ describe("harpoon", function()
eq(harpoon.ui.win_id, nil)
end)
it("closing toggle_quick_menu with save_on_toggle should save contents", function()
harpoon:setup({ settings = { save_on_toggle = true }})
local list = harpoon:list()
local created_files = utils.fill_list_with_files(3, list)
it(
"closing toggle_quick_menu with save_on_toggle should save contents",
function()
harpoon:setup({ settings = { save_on_toggle = true } })
local list = harpoon:list()
local created_files = utils.fill_list_with_files(3, list)
harpoon.ui:toggle_quick_menu(list)
table.remove(created_files, 2)
Buffer.set_contents(harpoon.ui.bufnr, created_files)
harpoon.ui:toggle_quick_menu()
harpoon.ui:toggle_quick_menu(list)
table.remove(created_files, 2)
Buffer.set_contents(harpoon.ui.bufnr, created_files)
harpoon.ui:toggle_quick_menu()
eq(list:length(), 2)
eq(list:display(), created_files)
end)
eq(list:length(), 2)
eq(list:display(), created_files)
end
)
end)

View File

@ -71,7 +71,7 @@ end
function M.fill_list_with_files(count, list)
local files = {}
for i = 1, count do
for _ = 1, count do
local name = os.tmpname()
table.insert(files, name)
M.create_file(name, { "test" })