diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-04-24 18:40:03 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2024-04-25 08:37:18 +0200 |
commit | 1294e221a205f1f3c6d2e31421b674db6e747406 (patch) | |
tree | 8cd25aee8df5f446f09654c0e917221720c4ea7f /test/functional/lua/loop_spec.lua | |
parent | a1550dbf0ac252052a7a71780708d3ec05aa3686 (diff) | |
download | rneovim-1294e221a205f1f3c6d2e31421b674db6e747406.tar.gz rneovim-1294e221a205f1f3c6d2e31421b674db6e747406.tar.bz2 rneovim-1294e221a205f1f3c6d2e31421b674db6e747406.zip |
fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
Diffstat (limited to 'test/functional/lua/loop_spec.lua')
-rw-r--r-- | test/functional/lua/loop_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/lua/loop_spec.lua b/test/functional/lua/loop_spec.lua index d5c5cd3cd0..566a171a84 100644 --- a/test/functional/lua/loop_spec.lua +++ b/test/functional/lua/loop_spec.lua @@ -133,6 +133,20 @@ describe('vim.uv', function() {5:-- INSERT --} | ]]) eq({ blocking = false, mode = 'n' }, exec_lua('return _G.mode')) + + exec_lua([[ + local timer = vim.uv.new_timer() + timer:start(20, 0, function () + _G.is_fast = vim.in_fast_event() + timer:close() + _G.value = vim.fn.has("nvim-0.5") + _G.unvalue = vim.fn.has("python3") + end) + ]]) + + screen:expect({ any = [[{3:Vim:E5560: Vimscript function must not be called i}]] }) + feed('<cr>') + eq({ 1, nil }, exec_lua('return {_G.value, _G.unvalue}')) end) it("is equal to require('luv')", function() |