aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
authorMatthieu Coudron <886074+teto@users.noreply.github.com>2025-10-21 16:46:03 +0200
committerGitHub <noreply@github.com>2025-10-21 07:46:03 -0700
commite42050f4aed5ee332cc95bacd622bfbc9a31dbe0 (patch)
tree8272c003aef62238697c100273c575a82997f4b1 /test/functional/lua/vim_spec.lua
parent3c4acc0f1a2ba3c54e858283cf949e28079eb379 (diff)
downloadrneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.tar.gz
rneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.tar.bz2
rneovim-e42050f4aed5ee332cc95bacd622bfbc9a31dbe0.zip
feat(vimscript): log function name in "fast" message #32616
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index 7d2db461b6..d5143cb033 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -1355,6 +1355,22 @@ describe('lua stdlib', function()
)
end)
+ it('vim.call fails in fast context', function()
+ local screen = Screen.new(120, 10)
+ exec_lua([[
+ local timer = vim.uv.new_timer()
+ timer:start(0, 0, function()
+ timer:close()
+ vim.call('sin', 0.0)
+ end)
+ ]])
+ screen:expect({
+ any = pesc('E5560: Vimscript function "sin" must not be called in a fast event context'),
+ })
+ feed('<CR>')
+ assert_alive()
+ end)
+
it('vim.fn errors when calling API function', function()
matches(
'Tried to call API function with vim.fn: use vim.api.nvim_get_current_line instead',