From f57432af4db184912af7c107f2bba23b5c37473a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 27 Jul 2022 20:59:43 +0800 Subject: vim-patch:9.0.0090: no error when assigning bool to a string option (#19539) Problem: No error when assigning bool to a string option with setwinvar(). Solution: Give an error (closes vim/vim#10766) https://github.com/vim/vim/commit/28f84e17b068daca2635692d279930dcb7a150d0 --- test/functional/vimscript/buf_functions_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/functional/vimscript/buf_functions_spec.lua') diff --git a/test/functional/vimscript/buf_functions_spec.lua b/test/functional/vimscript/buf_functions_spec.lua index e957e5f5af..b521620320 100644 --- a/test/functional/vimscript/buf_functions_spec.lua +++ b/test/functional/vimscript/buf_functions_spec.lua @@ -303,4 +303,8 @@ describe('setbufvar() function', function() pcall_err(funcs.setbufvar, 1, 'changedtick', true)) eq(2, funcs.getbufvar(1, 'changedtick')) end) + it('throws error when setting a string option to a boolean value vim-patch:9.0.0090', function() + eq('Vim:E928: String required', + pcall_err(funcs.setbufvar, '', '&errorformat', true)) + end) end) -- cgit