mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.0.0479: remote_peek() is not tested
Problem: remote_peek() is not tested. Solution: Add a test.
This commit is contained in:
@@ -247,6 +247,8 @@ for s:test in sort(s:tests)
|
|||||||
call RunTheTest(s:test)
|
call RunTheTest(s:test)
|
||||||
|
|
||||||
if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
|
if len(v:errors) > 0 && index(s:flaky, s:test) >= 0
|
||||||
|
call add(s:messages, 'Found errors in ' . s:test . ':')
|
||||||
|
call extend(s:messages, v:errors)
|
||||||
call add(s:messages, 'Flaky test failed, running it again')
|
call add(s:messages, 'Flaky test failed, running it again')
|
||||||
let v:errors = []
|
let v:errors = []
|
||||||
call RunTheTest(s:test)
|
call RunTheTest(s:test)
|
||||||
|
@@ -81,6 +81,27 @@ func Test_client_server()
|
|||||||
call assert_equal('got it', remote_read(g:myserverid))
|
call assert_equal('got it', remote_read(g:myserverid))
|
||||||
let s:where = 16
|
let s:where = 16
|
||||||
|
|
||||||
|
call remote_send(name, ":call server2client(expand('<client>'), 'another')\<CR>", 'g:myserverid')
|
||||||
|
let s:where = 151
|
||||||
|
let peek_result = 'nothing'
|
||||||
|
let r = remote_peek(g:myserverid, 'peek_result')
|
||||||
|
let s:where = 161
|
||||||
|
" unpredictable whether the result is already avaialble.
|
||||||
|
if r > 0
|
||||||
|
call assert_equal('another', peek_result)
|
||||||
|
elseif r == 0
|
||||||
|
call assert_equal('nothing', peek_result)
|
||||||
|
else
|
||||||
|
call assert_report('remote_peek() failed')
|
||||||
|
endif
|
||||||
|
let g:peek_result = 'empty'
|
||||||
|
call WaitFor('remote_peek(g:myserverid, "g:peek_result") > 0')
|
||||||
|
let s:where = 171
|
||||||
|
call assert_equal('another', g:peek_result)
|
||||||
|
let s:where = 181
|
||||||
|
call assert_equal('another', remote_read(g:myserverid))
|
||||||
|
let s:where = 191
|
||||||
|
|
||||||
call remote_send(name, ":qa!\<CR>")
|
call remote_send(name, ":qa!\<CR>")
|
||||||
let s:where = 17
|
let s:where = 17
|
||||||
call WaitFor('job_status(g:job) == "dead"')
|
call WaitFor('job_status(g:job) == "dead"')
|
||||||
|
@@ -764,6 +764,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
479,
|
||||||
/**/
|
/**/
|
||||||
478,
|
478,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user