diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-11-10 19:01:53 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-11-10 19:01:53 -0500 |
commit | 3080672650b1a6583684edfdafef7e07c0c7cf56 (patch) | |
tree | 888527c926d8117c21d291311e34f271614cf66f /test/functional/helpers.lua | |
parent | b0cd397a43ae18942e12b1c76f838aac135b18cf (diff) | |
parent | 3e8ef31ada1f2ae0b0cd58bb25d5516d19eee82d (diff) | |
download | rneovim-3080672650b1a6583684edfdafef7e07c0c7cf56.tar.gz rneovim-3080672650b1a6583684edfdafef7e07c0c7cf56.tar.bz2 rneovim-3080672650b1a6583684edfdafef7e07c0c7cf56.zip |
Merge pull request #1448 from tarruda/shell-systemlist-test-fixes
Fixes to shell.c, systemlist and functional tests
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index bf6e3dd38a..6c3f5190c9 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -25,7 +25,7 @@ if os.getenv('VALGRIND') then nvim_argv = valgrind_argv end -local session, loop_running, last_error +local session, loop_running, loop_stopped, last_error local function request(method, ...) local status, rv = session:request(method, ...) @@ -39,7 +39,11 @@ local function request(method, ...) end -- Make sure this will only return after all buffered characters have been -- processed - session:request('vim_eval', '1') + if not loop_stopped then + -- Except when the loop has been stopped by a notification triggered + -- by the initial request, for example. + session:request('vim_eval', '1') + end return rv end @@ -71,6 +75,7 @@ local function run(request_cb, notification_cb, setup_cb) call_and_stop_on_error(setup_cb) end + loop_stopped = false loop_running = true session:run(on_request, on_notification, on_setup) loop_running = false @@ -82,6 +87,7 @@ local function run(request_cb, notification_cb, setup_cb) end local function stop() + loop_stopped = true session:stop() end |