diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-01 10:11:10 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-01 10:11:10 -0700 |
| commit | 78a2bbaa4b0ee6b0e575c4239b7b35eb42852910 (patch) | |
| tree | 6ad31d5c30d0b85b605ca72860eae12a2734f896 /src/nvim/testdir/test_clientserver.vim | |
| parent | 53b7f60805745c473bc31acc02e018abb6b031a7 (diff) | |
| parent | 8a187aee8c7fe46340af143bfda444e418f9a0a9 (diff) | |
| download | rneovim-78a2bbaa4b0ee6b0e575c4239b7b35eb42852910.tar.gz rneovim-78a2bbaa4b0ee6b0e575c4239b7b35eb42852910.tar.bz2 rneovim-78a2bbaa4b0ee6b0e575c4239b7b35eb42852910.zip | |
Merge #10906 from janlazo/vim-8.0.1241
vim-patch:8.0.{1241,1246,1260}
Diffstat (limited to 'src/nvim/testdir/test_clientserver.vim')
| -rw-r--r-- | src/nvim/testdir/test_clientserver.vim | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim index 46ac59b3b1..f03a6903c1 100644 --- a/src/nvim/testdir/test_clientserver.vim +++ b/src/nvim/testdir/test_clientserver.vim @@ -27,12 +27,8 @@ func Test_client_server() let name = 'XVIMTEST' let cmd .= ' --servername ' . name - let g:job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) - call WaitFor('job_status(g:job) == "run"') - if job_status(g:job) != 'run' - call assert_report('Cannot run the Vim server') - return - endif + let job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'}) + call WaitFor({-> job_status(job) == "run"}) " Takes a short while for the server to be active. " When using valgrind it takes much longer. @@ -83,7 +79,7 @@ func Test_client_server() call remote_send(name, ":call server2client(expand('<client>'), 'another')\<CR>", 'g:myserverid') let peek_result = 'nothing' let r = remote_peek(g:myserverid, 'peek_result') - " unpredictable whether the result is already avaialble. + " unpredictable whether the result is already available. if r > 0 call assert_equal('another', peek_result) elseif r == 0 @@ -97,11 +93,14 @@ func Test_client_server() call assert_equal('another', remote_read(g:myserverid, 2)) call remote_send(name, ":qa!\<CR>") - call WaitFor('job_status(g:job) == "dead"') - if job_status(g:job) != 'dead' - call assert_report('Server did not exit') - call job_stop(g:job, 'kill') - endif + try + call WaitFor({-> job_status(job) == "dead"}) + finally + if job_status(job) != 'dead' + call assert_report('Server did not exit') + call job_stop(job, 'kill') + endif + endtry endfunc " Uncomment this line to get a debugging log |