diff options
author | bfredl <bjorn.linse@gmail.com> | 2024-04-25 08:58:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 08:58:58 +0200 |
commit | 2b9df3f79541507bfc3ba2645e6b9740e7c922ed (patch) | |
tree | 6112039092aabc134276fd5a8c121742be9ff069 /test/functional/lua/loop_spec.lua | |
parent | 30374db9554d871c217f41d00ce015b8e00b8680 (diff) | |
parent | 1294e221a205f1f3c6d2e31421b674db6e747406 (diff) | |
download | rneovim-2b9df3f79541507bfc3ba2645e6b9740e7c922ed.tar.gz rneovim-2b9df3f79541507bfc3ba2645e6b9740e7c922ed.tar.bz2 rneovim-2b9df3f79541507bfc3ba2645e6b9740e7c922ed.zip |
Merge pull request #28492 from bfredl/hotfix
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() |