From 04f2f864e270e772c6326cefdf24947f0130e492 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Wed, 3 Jan 2024 02:09:18 +0100 Subject: refactor: format test/* --- test/functional/vimscript/state_spec.lua | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/functional/vimscript/state_spec.lua') diff --git a/test/functional/vimscript/state_spec.lua b/test/functional/vimscript/state_spec.lua index 0508b8b1da..e93989ef80 100644 --- a/test/functional/vimscript/state_spec.lua +++ b/test/functional/vimscript/state_spec.lua @@ -12,7 +12,7 @@ before_each(clear) describe('state() function', function() -- oldtest: Test_state() it('works', function() - meths.ui_attach(80, 24, {}) -- Allow hit-enter-prompt + meths.ui_attach(80, 24, {}) -- Allow hit-enter-prompt exec_lua([[ function _G.Get_state_mode() @@ -42,34 +42,34 @@ describe('state() function', function() -- Using a timer callback feed([[:call RunTimer()]]) - poke_eventloop() -- Process pending input - poke_eventloop() -- Process time_event + poke_eventloop() -- Process pending input + poke_eventloop() -- Process time_event eq({ 'c', 'n' }, exec_lua('return _G.res')) -- Halfway a mapping feed([[:call v:lua.Run_timer();]]) - meths.get_mode() -- Process pending input and luv timer callback + meths.get_mode() -- Process pending input and luv timer callback feed(';') eq({ 'mS', 'n' }, exec_lua('return _G.res')) -- An operator is pending feed([[:call RunTimer()y]]) - poke_eventloop() -- Process pending input - poke_eventloop() -- Process time_event + poke_eventloop() -- Process pending input + poke_eventloop() -- Process time_event feed('y') eq({ 'oSc', 'n' }, exec_lua('return _G.res')) -- A register was specified feed([[:call RunTimer()"r]]) - poke_eventloop() -- Process pending input - poke_eventloop() -- Process time_event + poke_eventloop() -- Process pending input + poke_eventloop() -- Process time_event feed('yy') eq({ 'oSc', 'n' }, exec_lua('return _G.res')) -- Insert mode completion feed([[:call RunTimer()Got]]) - poke_eventloop() -- Process pending input - poke_eventloop() -- Process time_event + poke_eventloop() -- Process pending input + poke_eventloop() -- Process time_event feed('') eq({ 'aSc', 'i' }, exec_lua('return _G.res')) @@ -79,7 +79,7 @@ describe('state() function', function() -- messages scrolled feed([[:call v:lua.Run_timer() | echo "one\ntwo\nthree"]]) - meths.get_mode() -- Process pending input and luv timer callback + meths.get_mode() -- Process pending input and luv timer callback feed('') eq({ 'Ss', 'r' }, exec_lua('return _G.res')) end) -- cgit From c30f2e3182e3b50e7c03932027ac55edfc8ada4a Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 12 Jan 2024 12:44:54 +0000 Subject: test: typing for helpers.meths --- test/functional/vimscript/state_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/vimscript/state_spec.lua') diff --git a/test/functional/vimscript/state_spec.lua b/test/functional/vimscript/state_spec.lua index e93989ef80..f9a21c5881 100644 --- a/test/functional/vimscript/state_spec.lua +++ b/test/functional/vimscript/state_spec.lua @@ -12,7 +12,7 @@ before_each(clear) describe('state() function', function() -- oldtest: Test_state() it('works', function() - meths.ui_attach(80, 24, {}) -- Allow hit-enter-prompt + meths.nvim_ui_attach(80, 24, {}) -- Allow hit-enter-prompt exec_lua([[ function _G.Get_state_mode() @@ -48,7 +48,7 @@ describe('state() function', function() -- Halfway a mapping feed([[:call v:lua.Run_timer();]]) - meths.get_mode() -- Process pending input and luv timer callback + meths.nvim_get_mode() -- Process pending input and luv timer callback feed(';') eq({ 'mS', 'n' }, exec_lua('return _G.res')) @@ -79,7 +79,7 @@ describe('state() function', function() -- messages scrolled feed([[:call v:lua.Run_timer() | echo "one\ntwo\nthree"]]) - meths.get_mode() -- Process pending input and luv timer callback + meths.nvim_get_mode() -- Process pending input and luv timer callback feed('') eq({ 'Ss', 'r' }, exec_lua('return _G.res')) end) -- cgit From 795f896a5772d5e0795f86642bdf90c82efac45c Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Fri, 12 Jan 2024 17:59:57 +0000 Subject: test: rename (meths, funcs) -> (api, fn) --- test/functional/vimscript/state_spec.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/functional/vimscript/state_spec.lua') diff --git a/test/functional/vimscript/state_spec.lua b/test/functional/vimscript/state_spec.lua index f9a21c5881..7179806e36 100644 --- a/test/functional/vimscript/state_spec.lua +++ b/test/functional/vimscript/state_spec.lua @@ -4,7 +4,7 @@ local eq = helpers.eq local exec = helpers.exec local exec_lua = helpers.exec_lua local feed = helpers.feed -local meths = helpers.meths +local api = helpers.api local poke_eventloop = helpers.poke_eventloop before_each(clear) @@ -12,7 +12,7 @@ before_each(clear) describe('state() function', function() -- oldtest: Test_state() it('works', function() - meths.nvim_ui_attach(80, 24, {}) -- Allow hit-enter-prompt + api.nvim_ui_attach(80, 24, {}) -- Allow hit-enter-prompt exec_lua([[ function _G.Get_state_mode() @@ -48,7 +48,7 @@ describe('state() function', function() -- Halfway a mapping feed([[:call v:lua.Run_timer();]]) - meths.nvim_get_mode() -- Process pending input and luv timer callback + api.nvim_get_mode() -- Process pending input and luv timer callback feed(';') eq({ 'mS', 'n' }, exec_lua('return _G.res')) @@ -79,7 +79,7 @@ describe('state() function', function() -- messages scrolled feed([[:call v:lua.Run_timer() | echo "one\ntwo\nthree"]]) - meths.nvim_get_mode() -- Process pending input and luv timer callback + api.nvim_get_mode() -- Process pending input and luv timer callback feed('') eq({ 'Ss', 'r' }, exec_lua('return _G.res')) end) -- cgit