aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-01-23 18:06:52 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-01-23 18:58:19 -0300
commit41225fe4f69b507b020d7bf4033e02d3f4fbdd40 (patch)
tree8784a545509a0c80caae5ccd90b33480ec661c55 /test/functional/helpers.lua
parentc472e3af64aa0cd10cf96bce6a1f4647a07e8935 (diff)
downloadrneovim-41225fe4f69b507b020d7bf4033e02d3f4fbdd40.tar.gz
rneovim-41225fe4f69b507b020d7bf4033e02d3f4fbdd40.tar.bz2
rneovim-41225fe4f69b507b020d7bf4033e02d3f4fbdd40.zip
test: Fix hanging test suite after failures
When a test that fails leaves nvim in a 'Press Enter...' state, the whole suite will hang because the `qa!` command executed before the next test won't be processed until '<enter>' is sent. Now the lua client can send a signal with when `Session:exit()` is called, so the `qa!` request is no longer necessary. Also: - Set noswapfile at startup to prevent tests from leaving .s* swap files(should also improve test environment determinism) - Use `assert(false, msg) instead of `error(msg)` to report screen assertion failures.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index c76979e894..ea98ff4ce3 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -6,7 +6,8 @@ local Session = require('nvim.session')
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
- '--cmd', 'set shortmess+=I background=light', '--embed'}
+ '--cmd', 'set shortmess+=I background=light noswapfile',
+ '--embed'}
local prepend_argv
if os.getenv('VALGRIND') then
@@ -153,8 +154,7 @@ end
local function clear()
if session then
- session:request('vim_command', 'qa!')
- session:exit()
+ session:exit(0)
end
local loop = Loop.new()
local msgpack_stream = MsgpackStream.new(loop)