view src/testdir/test_job_fails.vim @ 28721:ec4086492eda v8.2.4885

patch 8.2.4885: test fails with the job/channel feature Commit: https://github.com/vim/vim/commit/f1d63b9cba9ca91d6367615c6098761c30c6cb5b Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 6 13:37:42 2022 +0100 patch 8.2.4885: test fails with the job/channel feature Problem: Test fails with the job/channel feature. Solution: Move check for job/channel separately.
author Bram Moolenaar <Bram@vim.org>
date Fri, 06 May 2022 14:45:03 +0200
parents 08940efa6b4e
children
line wrap: on
line source

" This test is in a separate file, because it usually causes reports for memory
" leaks under valgrind.  That is because when fork/exec fails memory is not
" freed.  Since the process exits right away it's not a real leak.

source check.vim

func Test_job_start_fails()
  CheckFeature job
  let job = job_start('axdfxsdf')
  if has('unix')
    call WaitForAssert({-> assert_equal("dead", job_status(job))})
  else
    call WaitForAssert({-> assert_equal("fail", job_status(job))})
  endif
endfunc

" vim: shiftwidth=2 sts=2 expandtab