Mercurial > vim
comparison src/testdir/test_clientserver.vim @ 12746:27eee6528b3d v8.0.1251
patch 8.0.1251: invalid expressin passed to WaitFor()
commit https://github.com/vim/vim/commit/d97fbf171ec0e63117813da045d2a1c51a9b6f62
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 19:23:03 2017 +0100
patch 8.0.1251: invalid expressin passed to WaitFor()
Problem: Invalid expressin passed to WaitFor().
Solution: Check if the variable exists.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 19:30:06 +0100 |
parents | 6ef5e636f246 |
children | c1347c968d31 |
comparison
equal
deleted
inserted
replaced
12745:538e2f4367a9 | 12746:27eee6528b3d |
---|---|
40 call assert_match(name, serverlist()) | 40 call assert_match(name, serverlist()) |
41 | 41 |
42 call remote_foreground(name) | 42 call remote_foreground(name) |
43 | 43 |
44 call remote_send(name, ":let testvar = 'yes'\<CR>") | 44 call remote_send(name, ":let testvar = 'yes'\<CR>") |
45 call WaitFor('remote_expr("' . name . '", "testvar", "", 1) == "yes"') | 45 call WaitFor('remote_expr("' . name . '", "exists(\"testvar\") ? testvar : \"\"", "", 1) == "yes"') |
46 call assert_equal('yes', remote_expr(name, "testvar", "", 2)) | 46 call assert_equal('yes', remote_expr(name, "testvar", "", 2)) |
47 | 47 |
48 if has('unix') && has('gui') && !has('gui_running') | 48 if has('unix') && has('gui') && !has('gui_running') |
49 " Running in a terminal and the GUI is available: Tell the server to open | 49 " Running in a terminal and the GUI is available: Tell the server to open |
50 " the GUI and check that the remote command still works. | 50 " the GUI and check that the remote command still works. |