mirror of
https://github.com/neovim/neovim.git
synced 2025-11-22 10:06:33 +00:00
test: spawn_wait() starts a non-RPC Nvim process
Problem: Can't use `n.clear()` to test non-RPC `nvim` invocations. So tests end up creating ad-hoc wrappers around `system()` or `jobstart()`. Solution: - Introduce `n.spawn_wait()` - TODO (followup PR): Rename `n.spawn()` and `n.spawn_wait()`. It's misleading that `n.spawn()` returns a RPC session...
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
-------------------------------------------------------------------------------
|
||||
-- (Not needed for LuaJIT or Lua 5.2+)
|
||||
--
|
||||
-- Coroutine safe xpcall and pcall versions
|
||||
--
|
||||
-- https://keplerproject.github.io/coxpcall/
|
||||
--
|
||||
-- Encapsulates the protected calls with a coroutine based loop, so errors can
|
||||
-- be dealed without the usual Lua 5.x pcall/xpcall issues with coroutines
|
||||
-- yielding inside the call to pcall or xpcall.
|
||||
|
||||
Reference in New Issue
Block a user