mirror of
https://github.com/neovim/neovim.git
synced 2025-11-19 16:51:18 +00:00
fix(lua): show error message when failing to set variable
(cherry picked from commit 2c5d373ede)
This commit is contained in:
committed by
github-actions[bot]
parent
6156d3fdc9
commit
8063aa7cf6
@@ -1348,6 +1348,9 @@ describe('API', function()
|
||||
-- Set readonly v: var.
|
||||
eq('Key is read-only: count',
|
||||
pcall_err(request, 'nvim_set_vvar', 'count', 42))
|
||||
-- Set non-existent v: var.
|
||||
eq('Dictionary is locked',
|
||||
pcall_err(request, 'nvim_set_vvar', 'nosuchvar', 42))
|
||||
-- Set writable v: var.
|
||||
meths.set_vvar('errmsg', 'set by API')
|
||||
eq('set by API', meths.get_vvar('errmsg'))
|
||||
|
||||
Reference in New Issue
Block a user