From 75119fcc86e055895af824f7fdbba2f42c1cbbe8 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 5 May 2023 07:02:43 +0800 Subject: vim-patch:8.2.3135: Vim9: builtin function arguments not checked at compile time Problem: Vim9: builtin function arguments not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes vim/vim#8539) https://github.com/vim/vim/commit/5b73992d8f82be7ac4b6f46c17f53ffb9640e5fa Co-authored-by: Yegappan Lakshmanan --- test/functional/vimscript/input_spec.lua | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'test/functional/vimscript/input_spec.lua') diff --git a/test/functional/vimscript/input_spec.lua b/test/functional/vimscript/input_spec.lua index f50b39c2c5..d1643a799a 100644 --- a/test/functional/vimscript/input_spec.lua +++ b/test/functional/vimscript/input_spec.lua @@ -222,17 +222,17 @@ describe('input()', function() eq('DEF2', meths.get_var('var')) end) it('errors out on invalid inputs', function() - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input([])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input("", [])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input("", "", [])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input({"prompt": []})')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input({"default": []})')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call input({"completion": []})')) eq('Vim(call):E5050: {opts} must be the only argument', exc_exec('call input({}, "default")')) @@ -418,17 +418,17 @@ describe('inputdialog()', function() eq('DEF2', meths.get_var('var')) end) it('errors out on invalid inputs', function() - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog([])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog("", [])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog("", "", [])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog({"prompt": []})')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog({"default": []})')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', exc_exec('call inputdialog({"completion": []})')) eq('Vim(call):E5050: {opts} must be the only argument', exc_exec('call inputdialog({}, "default")')) @@ -512,13 +512,13 @@ describe('confirm()', function() eq(1, meths.get_var('a')) end - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', pcall_err(command, 'call confirm([])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', pcall_err(command, 'call confirm("Are you sure?", [])')) eq('Vim(call):E745: Using a List as a Number', pcall_err(command, 'call confirm("Are you sure?", "&Yes\n&No\n", [])')) - eq('Vim(call):E730: using List as a String', + eq('Vim(call):E730: Using a List as a String', pcall_err(command, 'call confirm("Are you sure?", "&Yes\n&No\n", 0, [])')) end) -- cgit From 1fe1bb084d0099fc4f9bfdc11189485d0f74b75a Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 19 Dec 2022 16:37:45 +0000 Subject: refactor(options): deprecate nvim[_buf|_win]_[gs]et_option Co-authored-by: zeertzjq Co-authored-by: famiu --- test/functional/vimscript/input_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/vimscript/input_spec.lua') diff --git a/test/functional/vimscript/input_spec.lua b/test/functional/vimscript/input_spec.lua index d1643a799a..bd9f7e5381 100644 --- a/test/functional/vimscript/input_spec.lua +++ b/test/functional/vimscript/input_spec.lua @@ -452,8 +452,8 @@ end) describe('confirm()', function() -- oldtest: Test_confirm() it('works', function() - meths.set_option('more', false) -- Avoid hit-enter prompt - meths.set_option('laststatus', 2) + meths.set_option_value('more', false, {}) -- Avoid hit-enter prompt + meths.set_option_value('laststatus', 2, {}) -- screen:expect() calls are needed to avoid feeding input too early screen:expect({any = '%[No Name%]'}) -- cgit From 2f17ef1fc4b96cf1106fd95ba090d34a2e4b977b Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 22 Jun 2023 04:09:14 -0700 Subject: fix(messages): use "Vimscript" instead of "VimL" #24111 followup to #24109 fix #16150 --- test/functional/vimscript/input_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/functional/vimscript/input_spec.lua') diff --git a/test/functional/vimscript/input_spec.lua b/test/functional/vimscript/input_spec.lua index bd9f7e5381..e1179d29cc 100644 --- a/test/functional/vimscript/input_spec.lua +++ b/test/functional/vimscript/input_spec.lua @@ -552,7 +552,7 @@ describe('confirm()', function() feed(':silent edit foo') check_and_clear(':silent edit foo |\n') - -- With API (via eval/VimL) call and shortmess+=F + -- With API (via eval/Vimscript) call and shortmess+=F feed(':call nvim_command("edit x")') check_and_clear(':call nvim_command("edit |\n') -- cgit