Skip to content

Commit

Permalink
helper
Browse files Browse the repository at this point in the history
  • Loading branch information
grierson committed Aug 15, 2023
1 parent 37e8e27 commit 40aef7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 2 additions & 4 deletions fnl/spec/helper.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
(fn escape-keys [keys] (vim.api.nvim_replace_termcodes keys true false true))
(fn feedkeys [keys] (vim.api.nvim_feedkeys (escape-keys keys) :xmt true))

(fn expect [{: cursor : content : mode}]
(fn expect [{: cursor : content}]
(when content
(assert.are.same content
(core.first (vim.api.nvim_buf_get_lines 0 0 10 false))))
(when cursor
(assert.are.same cursor (vim.api.nvim_win_get_cursor 0)))
(when mode
(assert.are.equal mode (. (vim.api.nvim_get_mode) :mode))))
(assert.are.same cursor (vim.api.nvim_win_get_cursor 0))))

{: setup : expect : feedkeys}
7 changes: 1 addition & 6 deletions lua/spec/helper.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40aef7e

Please sign in to comment.