Mercurial > vim
comparison src/testdir/test_clientserver.vim @ 17994:0dcc2ee838dd v8.1.1993
patch 8.1.1993: more functions can be used as methods
Commit: https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 6 21:34:30 2019 +0200
patch 8.1.1993: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 06 Sep 2019 21:45:04 +0200 |
parents | 2029737e6a22 |
children | 546bdeef35f1 |
comparison
equal
deleted
inserted
replaced
17993:55bdc69c5e57 | 17994:0dcc2ee838dd |
---|---|
71 call assert_equal('myself', remote_expr(v:servername, 'testvar')) | 71 call assert_equal('myself', remote_expr(v:servername, 'testvar')) |
72 | 72 |
73 call remote_send(name, ":call server2client(expand('<client>'), 'got it')\<CR>", 'g:myserverid') | 73 call remote_send(name, ":call server2client(expand('<client>'), 'got it')\<CR>", 'g:myserverid') |
74 call assert_equal('got it', g:myserverid->remote_read(2)) | 74 call assert_equal('got it', g:myserverid->remote_read(2)) |
75 | 75 |
76 call remote_send(name, ":call server2client(expand('<client>'), 'another')\<CR>", 'g:myserverid') | 76 call remote_send(name, ":eval expand('<client>')->server2client('another')\<CR>", 'g:myserverid') |
77 let peek_result = 'nothing' | 77 let peek_result = 'nothing' |
78 let r = g:myserverid->remote_peek('peek_result') | 78 let r = g:myserverid->remote_peek('peek_result') |
79 " unpredictable whether the result is already available. | 79 " unpredictable whether the result is already available. |
80 if r > 0 | 80 if r > 0 |
81 call assert_equal('another', peek_result) | 81 call assert_equal('another', peek_result) |