From fe9cbcb3a5c82932ecfb8f49d07e98a1fc2b31e5 Mon Sep 17 00:00:00 2001 From: Evgeni Chasnovski Date: Sat, 25 Mar 2023 18:58:48 +0200 Subject: feat(api): nvim_exec2(), deprecate nvim_exec() #19032 Problem: The signature of nvim_exec() is not extensible per ":help api-contract". Solution: Introduce nvim_exec2() and deprecate nvim_exec(). --- test/functional/options/keymap_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/options/keymap_spec.lua') diff --git a/test/functional/options/keymap_spec.lua b/test/functional/options/keymap_spec.lua index 4fdc6ef4be..7ff86438b2 100644 --- a/test/functional/options/keymap_spec.lua +++ b/test/functional/options/keymap_spec.lua @@ -30,7 +30,7 @@ describe("'keymap' / :lmap", function() command('lmapclear ') command('set keymap=dvorak') command('set nomore') - local bindings = funcs.nvim_exec('lmap', true) + local bindings = funcs.nvim_exec2('lmap', { output = true }).output eq(dedent([[ l " @_ -- cgit From 4863ca6b8902c5b0aab95f2af640118cd417d379 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 26 Mar 2023 10:49:32 +0800 Subject: test: use exec_capture() in more places (#22787) Problem: Using `meths.exec2("code", { output = true })` is too verbose. Solution: Use exec_capture() in more places. --- test/functional/options/keymap_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/options/keymap_spec.lua') diff --git a/test/functional/options/keymap_spec.lua b/test/functional/options/keymap_spec.lua index 7ff86438b2..c390e3d943 100644 --- a/test/functional/options/keymap_spec.lua +++ b/test/functional/options/keymap_spec.lua @@ -2,7 +2,7 @@ local helpers = require('test.functional.helpers')(after_each) local clear, feed, eq = helpers.clear, helpers.feed, helpers.eq local expect, command, eval = helpers.expect, helpers.command, helpers.eval local insert, call = helpers.insert, helpers.call -local funcs, dedent = helpers.funcs, helpers.dedent +local exec_capture, dedent = helpers.exec_capture, helpers.dedent -- First test it's implemented using the :lmap and :lnoremap commands, then -- check those mappings behave as expected. @@ -30,7 +30,7 @@ describe("'keymap' / :lmap", function() command('lmapclear ') command('set keymap=dvorak') command('set nomore') - local bindings = funcs.nvim_exec2('lmap', { output = true }).output + local bindings = exec_capture('lmap') eq(dedent([[ l " @_ -- cgit