Skip to content

Commit 2edc44f

Browse files
author
Andrew Ferrier
committed
fix: Feed surplus <CR> to make tests work
1 parent d0f5856 commit 2edc44f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/debugprint.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ describe("can do various file types", function()
232232
write_file("foo")
233233
vim.api.nvim_win_set_cursor(0, { 1, 0 })
234234
feedkeys("dQp")
235+
feedkeys("<CR>")
235236
assert.are.same(
236237
"Don't have debugprint configuration for filetype foo",
237238
notify_message
@@ -633,7 +634,7 @@ describe("can handle treesitter identifiers", function()
633634

634635
local filename = write_file("lua")
635636
vim.api.nvim_win_set_cursor(0, { 2, 6 })
636-
feedkeys("dQp")
637+
feedkeys("dQp<CR>")
637638

638639
check_lines({
639640
"function x() {",
@@ -642,7 +643,7 @@ describe("can handle treesitter identifiers", function()
642643
"end",
643644
})
644645

645-
assert.are.same(vim.api.nvim_win_get_cursor(0), { 2, 6 })
646+
assert.are.same(vim.api.nvim_win_get_cursor(0), { 3, 0 })
646647
end)
647648

648649
it("non-identifier", function()

0 commit comments

Comments
 (0)