diff src/testdir/test_clientserver.vim @ 19852:12518b40c161 v8.2.0482

patch 8.2.0482: channel and sandbox code not sufficiently tested Commit: https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 30 19:32:53 2020 +0200 patch 8.2.0482: channel and sandbox code not sufficiently tested Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5855)
author Bram Moolenaar <Bram@vim.org>
date Mon, 30 Mar 2020 19:45:05 +0200
parents 546bdeef35f1
children 031184ace7c5
line wrap: on
line diff
--- 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