From b1991f66d5845ccb72c73fdf39153a0e1fbb1124 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 1 Dec 2019 22:26:36 -0800 Subject: API: rename nvim_source => nvim_exec - Eliminate nvim_source_output(): add boolean `output` param to nvim_exec() instead. --- test/functional/api/vim_spec.lua | 79 +++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 41 deletions(-) (limited to 'test/functional/api') diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 9a7744142a..d7baf68a5b 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -16,6 +16,7 @@ local parse_context = helpers.parse_context local request = helpers.request local source = helpers.source local next_msg = helpers.next_msg +local tmpname = helpers.tmpname local write_file = helpers.write_file local pcall_err = helpers.pcall_err @@ -75,131 +76,127 @@ describe('API', function() eq({mode='i', blocking=false}, nvim("get_mode")) end) - describe('nvim_source', function() + describe('nvim_exec', function() it('one-line input', function() - nvim('source', "let x1 = 'a'") + nvim('exec', "let x1 = 'a'", false) eq('a', nvim('get_var', 'x1')) end) it(':verbose set {option}?', function() - nvim('source', 'set nowrap') + nvim('exec', 'set nowrap', false) eq('nowrap\n\tLast set from :source (no file)', - nvim('source_output', 'verbose set wrap?')) + nvim('exec', 'verbose set wrap?', true)) end) it('multiline input', function() -- Heredoc + empty lines. - nvim('source', "let x2 = 'a'\n") + nvim('exec', "let x2 = 'a'\n", false) eq('a', nvim('get_var', 'x2')) - nvim('source','lua <