diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-11-11 09:34:23 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-11-11 09:34:23 +0800 |
commit | 8b5c32c8cd9b76aaefa0977a69789fa9bd43f2fd (patch) | |
tree | 9074a2641f22b0733d91d2fee90fe33c9c64cde1 /test/functional/core/channels_spec.lua | |
parent | a502a7a7311657564065c9d2cd1a64292550722c (diff) | |
download | rneovim-8b5c32c8cd9b76aaefa0977a69789fa9bd43f2fd.tar.gz rneovim-8b5c32c8cd9b76aaefa0977a69789fa9bd43f2fd.tar.bz2 rneovim-8b5c32c8cd9b76aaefa0977a69789fa9bd43f2fd.zip |
test: add tests for freeing channel opened by termopen()
This indirectly covers #16264
Diffstat (limited to 'test/functional/core/channels_spec.lua')
-rw-r--r-- | test/functional/core/channels_spec.lua | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/test/functional/core/channels_spec.lua b/test/functional/core/channels_spec.lua index f93ab0885f..93dec9fb35 100644 --- a/test/functional/core/channels_spec.lua +++ b/test/functional/core/channels_spec.lua @@ -3,8 +3,6 @@ local uname = helpers.uname local clear, eq, eval, next_msg, ok, source = helpers.clear, helpers.eq, helpers.eval, helpers.next_msg, helpers.ok, helpers.source local command, funcs, meths = helpers.command, helpers.funcs, helpers.meths -local exc_exec = helpers.exc_exec -local poke_eventloop = helpers.poke_eventloop local sleep = helpers.sleep local spawn, nvim_argv = helpers.spawn, helpers.nvim_argv local set_session = helpers.set_session @@ -283,16 +281,4 @@ describe('channels', function() -- works correctly with no output eq({"notification", "exit", {id, 1, {''}}}, next_msg()) end) - - it('should throw error when writing to a channel associated with a deleted terminal', function() - command('let id = nvim_open_term(0, {})') - local err = exc_exec([[bdelete! | call chansend(id, 'test')]]) - -- channel hasn't been freed yet - eq("Vim(call):Can't send data to closed stream", err) - -- process free_channel_event - poke_eventloop() - err = exc_exec([[call chansend(id, 'test')]]) - -- channel has ben freed - eq("Vim(call):E900: Invalid channel id", err) - end) end) |