aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2018-06-21 05:27:24 -0400
committerJustin M. Keyes <justinkz@gmail.com>2018-06-21 11:27:24 +0200
commitb92d6f490d93f788f018d7c8417d68d2d3de1a95 (patch)
tree71963fdd0bcf3f2e219685e0b19eb25eecabf1fd
parent52ebe34eebf361f28b1a374399cd7e3d8201bfb2 (diff)
downloadrneovim-b92d6f490d93f788f018d7c8417d68d2d3de1a95.tar.gz
rneovim-b92d6f490d93f788f018d7c8417d68d2d3de1a95.tar.bz2
rneovim-b92d6f490d93f788f018d7c8417d68d2d3de1a95.zip
vim-patch:8.0.{0632,1536} (#8609)
vim-patch:8.0.0632: the quotestar test is still a bit flaky Problem: The quotestar test is still a bit flaky. Solution: Kill any existing server to make the retry work. Wait for the register to be filled. https://github.com/vim/vim/commit/1c13c0fe3e7b15750464ffbc39a4648aa5c639be vim-patch:8.0.1536: quotestar test is flaky when using the GUI Problem: Quotestar test is flaky when using the GUI. Solution: Add check that the star register arrived at the server. Increase timeouts. https://github.com/vim/vim/commit/791010e648a68490440e202222938c8a93b9d0d3
-rw-r--r--src/nvim/testdir/test_quotestar.vim25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/nvim/testdir/test_quotestar.vim b/src/nvim/testdir/test_quotestar.vim
index 37e3a10ed1..3a7edcbd7c 100644
--- a/src/nvim/testdir/test_quotestar.vim
+++ b/src/nvim/testdir/test_quotestar.vim
@@ -50,6 +50,15 @@ func Do_test_quotestar_for_x11()
endtry
let name = 'XVIMCLIPBOARD'
+
+ " Make sure a previous server has exited
+ try
+ call remote_send(name, ":qa!\<CR>")
+ call WaitFor('serverlist() !~ "' . name . '"')
+ catch /E241:/
+ endtry
+ call assert_notmatch(name, serverlist())
+
let cmd .= ' --servername ' . name
let g:job = job_start(cmd, {'stoponexit': 'kill', 'out_io': 'null'})
call WaitFor('job_status(g:job) == "run"')
@@ -60,23 +69,23 @@ func Do_test_quotestar_for_x11()
" Takes a short while for the server to be active.
call WaitFor('serverlist() =~ "' . name . '"')
- call assert_match(name, serverlist())
" Wait for the server to be up and answering requests. One second is not
" always sufficient.
call WaitFor('remote_expr("' . name . '", "v:version", "", 2) != ""')
- " Clear the *-register of this vim instance.
- let @* = ''
-
- " Try to change the *-register of the server.
+ " Clear the *-register of this vim instance and wait for it to be picked up
+ " by the server.
+ let @* = 'no'
call remote_foreground(name)
+ call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"', 3000)
+
+ " Set the * register on the server.
call remote_send(name, ":let @* = 'yes'\<CR>")
- call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"')
- call assert_equal('yes', remote_expr(name, "@*", "", 2))
+ call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"', 3000)
" Check that the *-register of this vim instance is changed as expected.
- call assert_equal('yes', @*)
+ call WaitFor('@* == "yes"', 3000)
if has('unix') && has('gui') && !has('gui_running')
let @* = ''