From 03ab57da3b36dbca40300ad5271635ed9b021a20 Mon Sep 17 00:00:00 2001 From: Ade Attwood Date: Thu, 6 Oct 2022 07:44:12 +0100 Subject: [PATCH] test: add more mocks --- lua/ivy/vim_mock.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lua/ivy/vim_mock.lua b/lua/ivy/vim_mock.lua index 8f07472..f8febd5 100644 --- a/lua/ivy/vim_mock.lua +++ b/lua/ivy/vim_mock.lua @@ -4,6 +4,14 @@ local mock = { cursors = {}, } +mock.get_lines = function() + return mock.lines +end + +mock.get_commands = function() + return mock.commands +end + mock.reset = function() mock.commands = {} mock.lines = {} @@ -25,6 +33,7 @@ mock.reset = function() end, nvim_win_set_option = function() end, nvim_buf_set_option = function() end, + nvim_buf_set_name = function() end, nvim_buf_set_var = function() end, nvim_buf_set_keymap = function() end, nvim_buf_delete = function() end, @@ -66,6 +75,9 @@ mock.reset = function() return lines end, }, + schedule = function(callback) + callback() + end, } end