diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-01 07:29:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 07:29:38 -0700 |
commit | 0603eba6e713b2bd25cbbb55caf2342b0ccdece9 (patch) | |
tree | 79c1d699fd6a301e6fb8afb6d4510c93e2184627 /test/functional/api/server_notifications_spec.lua | |
parent | 5c643dee7bca26c933f7abfcf2757ccd8cb07af6 (diff) | |
download | rneovim-0603eba6e713b2bd25cbbb55caf2342b0ccdece9.tar.gz rneovim-0603eba6e713b2bd25cbbb55caf2342b0ccdece9.tar.bz2 rneovim-0603eba6e713b2bd25cbbb55caf2342b0ccdece9.zip |
feat(api): nvim_get_chan_info: include "argv" for jobs #15537
ref #15440
Diffstat (limited to 'test/functional/api/server_notifications_spec.lua')
-rw-r--r-- | test/functional/api/server_notifications_spec.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/functional/api/server_notifications_spec.lua b/test/functional/api/server_notifications_spec.lua index e989034925..279ede81f7 100644 --- a/test/functional/api/server_notifications_spec.lua +++ b/test/functional/api/server_notifications_spec.lua @@ -6,6 +6,7 @@ local meths = helpers.meths local exec_lua = helpers.exec_lua local retry = helpers.retry local isCI = helpers.isCI +local assert_alive = helpers.assert_alive describe('notify', function() local channel @@ -73,7 +74,7 @@ describe('notify', function() nvim('subscribe', 'event1') nvim('unsubscribe', 'doesnotexist') nvim('unsubscribe', 'event1') - eq(2, eval('1+1')) -- Still alive? + assert_alive() end) it('cancels stale events on channel close', function() @@ -83,12 +84,13 @@ describe('notify', function() end if helpers.pending_win32(pending) then return end local catchan = eval("jobstart(['cat'], {'rpc': v:true})") - eq({id=catchan, stream='job', mode='rpc', client = {}}, exec_lua ([[ + local catpath = eval('exepath("cat")') + eq({id=catchan, argv={catpath}, stream='job', mode='rpc', client = {}}, exec_lua ([[ vim.rpcnotify(..., "nvim_call_function", 'chanclose', {..., 'rpc'}) vim.rpcnotify(..., "nvim_subscribe", "daily_rant") return vim.api.nvim_get_chan_info(...) ]], catchan)) - eq(2, eval('1+1')) -- Still alive? + assert_alive() eq({false, 'Invalid channel: '..catchan}, exec_lua ([[ return {pcall(vim.rpcrequest, ..., 'nvim_eval', '1+1')}]], catchan)) retry(nil, 3000, function() eq({}, meths.get_chan_info(catchan)) end) -- cat be dead :( |