Mercurial > vim
diff src/testdir/test_channel.vim @ 20158:94f05de75e9f v8.2.0634
patch 8.2.0634: crash with null partial and blob
Commit: https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 25 15:24:44 2020 +0200
patch 8.2.0634: crash with null partial and blob
Problem: Crash with null partial and blob.
Solution: Check for NULL pointer. Add more tests. (Yegappan Lakshmanan,
closes #5984)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 Apr 2020 15:30:04 +0200 |
parents | 49694eceaa55 |
children | 2fb397573541 |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1139,6 +1139,8 @@ func Test_pipe_null() call assert_equal("run", job_status(job)) call assert_equal('channel fail', string(job_getchannel(job))) call assert_equal('fail', ch_status(job)) + call assert_equal('no process', string(test_null_job())) + call assert_equal('channel fail', string(test_null_channel())) call job_stop(job) endfunc @@ -1706,6 +1708,7 @@ func Test_partial_in_channel_cycle() let d.a = function('string', [d]) try let d.b = ch_open('nowhere:123', {'close_cb': d.a}) + call test_garbagecollect_now() catch call assert_exception('E901:') endtry @@ -1893,6 +1896,7 @@ function Ch_test_close_lambda(port) endif let g:Ch_close_ret = '' call ch_setoptions(handle, {'close_cb': {ch -> execute("let g:Ch_close_ret = 'closed'")}}) + call test_garbagecollect_now() call assert_equal('', ch_evalexpr(handle, 'close me')) call WaitForAssert({-> assert_equal('closed', g:Ch_close_ret)})