Files
neovim/test/functional/fixtures/start/nvim-leftpad/lua/async_leftpad.lua
bfredl 02f8ca59a8 fix(tests): indicate in test logs when nvim exit times out
When it happens it wastes 2 seconds which is NOT included in the
normal busted timing info. It is hard to correct this, but we
can at least print a warning when this happens.
2022-09-22 10:38:11 +02:00

6 lines
155 B
Lua

return function (val, res)
local handle
handle = vim.loop.new_async(function() _G[res] = require'leftpad'(val) handle:close() end)
handle:send()
end