summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-25 15:24:44 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-25 15:24:44 +0200
commit92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76 (patch)
tree92daff824edb3982d06e20aa33e3b2c8fe3331ed /src/testdir/test_channel.vim
parent9d8d0b5c644ea53364d04403740b3f23e57c1497 (diff)
patch 8.2.0634: crash with null partial and blobv8.2.0634
Problem: Crash with null partial and blob. Solution: Check for NULL pointer. Add more tests. (Yegappan Lakshmanan, closes #5984)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 9c51c640d6..4ba552bdbe 100644
--- 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)})