comparison src/testdir/test_channel.vim @ 13740:f309afff6f25 v8.0.1742

patch 8.0.1742: cannot get a list of all the jobs commit https://github.com/vim/vim/commit/e1fc51558dc14906a8d9f6a6e7bb1ac2a6ba8f3d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 21 19:49:08 2018 +0200 patch 8.0.1742: cannot get a list of all the jobs Problem: Cannot get a list of all the jobs. Cannot get the command of the job. Solution: When job_info() is called without an argument return a list of jobs. Otherwise, include the command that the job is running. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Apr 2018 20:00:07 +0200
parents 87ffb7f85b28
children 5f6c61a71c02
comparison
equal deleted inserted replaced
13739:0b766229da42 13740:f309afff6f25
506 let g:Ch_job = job 506 let g:Ch_job = job
507 call WaitFor('"dead" == job_status(g:Ch_job)') 507 call WaitFor('"dead" == job_status(g:Ch_job)')
508 let info = job_info(job) 508 let info = job_info(job)
509 call assert_equal("dead", info.status) 509 call assert_equal("dead", info.status)
510 call assert_equal("term", info.stoponexit) 510 call assert_equal("term", info.stoponexit)
511 call assert_equal(2, len(info.cmd))
512 call assert_equal("test_channel_pipe.py", info.cmd[1])
513
514 let found = 0
515 for j in job_info()
516 if j == job
517 let found += 1
518 endif
519 endfor
520 call assert_equal(1, found)
511 endfunc 521 endfunc
512 522
513 func Test_nl_pipe() 523 func Test_nl_pipe()
514 if !has('job') 524 if !has('job')
515 return 525 return