aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2022-06-08 23:22:50 +0200
committerbfredl <bjorn.linse@gmail.com>2022-06-13 10:15:44 +0200
commite3281d992e1b9366d67a4b4399e3b5e11bb6c1cc (patch)
treefe0a8377115e946faf1c0328285331b4fd6c8a4c /test/functional/helpers.lua
parentdd8b6094c03362cc60d627ce709a4a0f9825b86a (diff)
downloadrneovim-e3281d992e1b9366d67a4b4399e3b5e11bb6c1cc.tar.gz
rneovim-e3281d992e1b9366d67a4b4399e3b5e11bb6c1cc.tar.bz2
rneovim-e3281d992e1b9366d67a4b4399e3b5e11bb6c1cc.zip
fix(tests): check for EOF on exit of nvim properly
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 7c923351ab..ffb5694c15 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -270,6 +270,13 @@ function module.command(cmd)
module.request('nvim_command', cmd)
end
+
+-- use for commands which expect nvim to quit
+function module.expect_exit(...)
+ eq("EOF was received from Nvim. Likely the Nvim process crashed.",
+ module.pcall_err(...))
+end
+
-- Evaluates a VimL expression.
-- Fails on VimL error, but does not update v:errmsg.
function module.eval(expr)