diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-02 10:05:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 10:05:03 +0800 |
commit | 2c5906b55bb6092121f4d3b032d5449da7675c2b (patch) | |
tree | 12bc52db168cb9ecd5bb743c9b8013b4637ad260 /test | |
parent | ecc1595c7b81987ca9d6265d1e08ef37a05c95bf (diff) | |
download | rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.tar.gz rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.tar.bz2 rneovim-2c5906b55bb6092121f4d3b032d5449da7675c2b.zip |
fix(exit): skip unnecessary steps in TUI preserve_exit() (#21897)
This prevents the TUI from doing unexpected things when receiving a
deadly signal or running out of memory.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index b28728057f..1d9e7b8e11 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -14,6 +14,7 @@ local clear = helpers.clear local command = helpers.command local dedent = helpers.dedent local exec = helpers.exec +local exec_lua = helpers.exec_lua local testprg = helpers.testprg local retry = helpers.retry local nvim_prog = helpers.nvim_prog @@ -1506,6 +1507,11 @@ describe('TUI', function() {3:-- TERMINAL --} | ]]} end) + + it('no assert failure on deadly signal #21896', function() + exec_lua([[vim.loop.kill(vim.fn.jobpid(vim.bo.channel), 'sigterm')]]) + screen:expect({any = '%[Process exited 1%]'}) + end) end) describe('TUI', function() |