Skip to content

Commit

Permalink
tests: do not use --embed with nvim in RPC based test
Browse files Browse the repository at this point in the history
Ref: neovim/neovim#10031 (comment)

With `--embed` it would hang with output during autoload, likely waiting
for an hit-enter prompt (e.g. with `for i in range(0, 10) | echom i | endfor`
in `autoload/neomake/highlights.vim`).
  • Loading branch information
blueyed committed Jun 2, 2019
1 parent 48d0c49 commit 387bab1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/compat.vader
Expand Up @@ -78,7 +78,15 @@ Execute (neomake#compat#get_mode):

if has('nvim')
let nvim_exe = '/proc/'.getpid().'/exe'
let nvim = jobstart([nvim_exe, '-u', 'tests/vim/vimrc', '--headless', '--embed'], {'rpc': v:true})
let nvim_cmd = [nvim_exe, '-u', 'tests/vim/vimrc', '--headless']
if has('nvim-0.3.0')
" Do not use --embed, which might cause it to hang with hit-enter prompt
" due to `echom` (while debugging). Requires Neovim 0.3.0+.
let nvim_cmd += ['--cmd', "call stdioopen({'rpc': v:true})"]
else
let nvim_cmd += ['--embed']
endif
let nvim = jobstart(nvim_cmd, {'rpc': v:true})
call rpcrequest(nvim, 'nvim_call_function', 'feedkeys', ['d', '!'])
call rpcrequest(nvim, 'nvim_eval', 'assert_equal(neomake#compat#get_mode(), "no")')
let rpc_errors = rpcrequest(nvim, 'nvim_eval', 'v:errors')
Expand Down

0 comments on commit 387bab1

Please sign in to comment.