diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-14 22:56:11 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-15 19:47:24 -0400 |
commit | 8dd91ddb73ba31e451e76b72861fea90fede1de3 (patch) | |
tree | dd837dd3f0993a273cc8b9264348a3ef060d63e2 /test/functional/terminal/buffer_spec.lua | |
parent | df376d2e49ba3b73baa447afee16374eb9cad623 (diff) | |
download | rneovim-8dd91ddb73ba31e451e76b72861fea90fede1de3.tar.gz rneovim-8dd91ddb73ba31e451e76b72861fea90fede1de3.tar.bz2 rneovim-8dd91ddb73ba31e451e76b72861fea90fede1de3.zip |
test: term_close use-after-free
References #4393
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index 55ef254a63..cefb603a7e 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -158,8 +158,7 @@ describe('terminal buffer', function() end) it('handles loss of focus gracefully', function() - -- Temporarily change the statusline to avoid printing the file name, which - -- varies be where the test is run. + -- Change the statusline to avoid printing the file name, which varies. nvim('set_option', 'statusline', '==========') execute('set laststatus=0') @@ -195,5 +194,15 @@ describe('terminal buffer', function() execute('set laststatus=1') -- Restore laststatus to the default. end) + + it('term_close() use-after-free #4393', function() + if eval("executable('yes')") == 0 then + pending('missing "yes" command') + return + end + execute('terminal yes') + feed([[<C-\><C-n>]]) + execute('bdelete!') + end) end) |