mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
test: allow exec_lua to handle functions
Problem: Tests have lots of exec_lua calls which input blocks of code provided as unformatted strings. Solution: Teach exec_lua how to handle functions.
This commit is contained in:
committed by
Lewis Russell
parent
f32557ca67
commit
7d24c4d6b0
@@ -145,10 +145,10 @@ describe('luaeval(vim.api.…)', function()
|
||||
eq(true, fn.luaeval('vim.api.nvim__id(vim.api.nvim__id)(true)'))
|
||||
eq(
|
||||
42,
|
||||
exec_lua [[
|
||||
local f = vim.api.nvim__id({42, vim.api.nvim__id})
|
||||
return f[2](f[1])
|
||||
]]
|
||||
exec_lua(function()
|
||||
local f = vim.api.nvim__id({ 42, vim.api.nvim__id })
|
||||
return f[2](f[1])
|
||||
end)
|
||||
)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user