diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-09-01 13:40:58 +0100 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-10-03 20:12:20 +0100 |
| commit | a8504638cd2497b3bdd0daf27dcc50903e1e2bb9 (patch) | |
| tree | f0efd03e80218092b1fec4a986d6c9fa40b3dd03 /src/nvim/testdir/test_clientserver.vim | |
| parent | c5583df3c081e485b521570891dbdd16cd952a85 (diff) | |
| download | rneovim-a8504638cd2497b3bdd0daf27dcc50903e1e2bb9.tar.gz rneovim-a8504638cd2497b3bdd0daf27dcc50903e1e2bb9.tar.bz2 rneovim-a8504638cd2497b3bdd0daf27dcc50903e1e2bb9.zip | |
feat(eval/method): partially port v8.1.1987
Cannot be fully ported as the remote_*() functions from +clientserver
are not yet ported. Include the test changes anyway.
line()'s optional winid argument was already ported. (Wasn't added in
this patch; this just adds documentation)
Diffstat (limited to 'src/nvim/testdir/test_clientserver.vim')
| -rw-r--r-- | src/nvim/testdir/test_clientserver.vim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim index 53704bd094..f3db472b03 100644 --- a/src/nvim/testdir/test_clientserver.vim +++ b/src/nvim/testdir/test_clientserver.vim @@ -34,7 +34,7 @@ func Test_client_server() " When using valgrind it takes much longer. call WaitForAssert({-> assert_match(name, serverlist())}) - call remote_foreground(name) + eval name->remote_foreground() call remote_send(name, ":let testvar = 'yes'\<CR>") call WaitFor('remote_expr("' . name . '", "exists(\"testvar\") ? testvar : \"\"", "", 1) == "yes"') @@ -53,7 +53,7 @@ func Test_client_server() endif " Wait for the server to be up and answering requests. sleep 100m - call WaitForAssert({-> assert_true(remote_expr(name, "v:version", "", 1) != "")}) + call WaitForAssert({-> assert_true(name->remote_expr("v:version", "", 1) != "")}) call remote_send(name, ":let testvar = 'maybe'\<CR>") call WaitForAssert({-> assert_equal('maybe', remote_expr(name, "testvar", "", 2))}) @@ -72,7 +72,7 @@ func Test_client_server() " Expression evaluated locally. if v:servername == '' - call remote_startserver('MYSELF') + eval 'MYSELF'->remote_startserver() " May get MYSELF1 when running the test again. call assert_match('MYSELF', v:servername) endif @@ -80,11 +80,11 @@ func Test_client_server() call assert_equal('myself', remote_expr(v:servername, 'testvar')) call remote_send(name, ":call server2client(expand('<client>'), 'got it')\<CR>", 'g:myserverid') - call assert_equal('got it', remote_read(g:myserverid, 2)) + call assert_equal('got it', g:myserverid->remote_read(2)) call remote_send(name, ":call server2client(expand('<client>'), 'another')\<CR>", 'g:myserverid') let peek_result = 'nothing' - let r = remote_peek(g:myserverid, 'peek_result') + let r = g:myserverid->remote_peek('peek_result') " unpredictable whether the result is already available. if r > 0 call assert_equal('another', peek_result) @@ -98,7 +98,7 @@ func Test_client_server() call assert_equal('another', g:peek_result) call assert_equal('another', remote_read(g:myserverid, 2)) - call remote_send(name, ":qa!\<CR>") + eval name->remote_send(":qa!\<CR>") try call WaitForAssert({-> assert_equal("dead", job_status(job))}) finally |