summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_clientserver.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
committerBram Moolenaar <Bram@vim.org>2020-03-30 19:32:53 +0200
commitca68ae13114619df3e4c195b41ad0575516f5ff6 (patch)
tree9022b7f5f1c8bb1ab22660530244414e9b6cdd99 /src/testdir/test_clientserver.vim
parent7d333a900d260b8e8caa0fb159c85023fc8795bd (diff)
patch 8.2.0482: channel and sandbox code not sufficiently testedv8.2.0482
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #5855)
Diffstat (limited to 'src/testdir/test_clientserver.vim')
-rw-r--r--src/testdir/test_clientserver.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_clientserver.vim b/src/testdir/test_clientserver.vim
index 1cbcb19f10..00b06b29d6 100644
--- a/src/testdir/test_clientserver.vim
+++ b/src/testdir/test_clientserver.vim
@@ -39,6 +39,8 @@ func Test_client_server()
call remote_send(name, ":let testvar = 'yes'\<CR>")
call WaitFor('remote_expr("' . name . '", "exists(\"testvar\") ? testvar : \"\"", "", 1) == "yes"')
call assert_equal('yes', remote_expr(name, "testvar", "", 2))
+ call assert_fails("let x=remote_expr(name, '2+x')", 'E449:')
+ call assert_fails("let x=remote_expr('[], '2+2')", 'E116:')
if has('unix') && has('gui') && !has('gui_running')
" Running in a terminal and the GUI is available: Tell the server to open
@@ -66,6 +68,7 @@ func Test_client_server()
eval 'MYSELF'->remote_startserver()
" May get MYSELF1 when running the test again.
call assert_match('MYSELF', v:servername)
+ call assert_fails("call remote_startserver('MYSELF')", 'E941:')
endif
let g:testvar = 'myself'
call assert_equal('myself', remote_expr(v:servername, 'testvar'))
@@ -100,6 +103,7 @@ func Test_client_server()
endtry
call assert_fails("let x=remote_peek([])", 'E730:')
+ call assert_fails("let x=remote_read('vim10')", 'E277:')
endfunc
" Uncomment this line to get a debugging log