view src/testdir/test_job_fails.vim @ 16381:1dcbaa780b8e v8.1.1195

patch 8.1.1195: Vim script debugger functionality needs cleanup commit https://github.com/vim/vim/commit/eead75c5e8e1f965548c55ee3a9388b2cb3afc36 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 21 11:35:00 2019 +0200 patch 8.1.1195: Vim script debugger functionality needs cleanup Problem: Vim script debugger functionality needs cleanup. Solution: Move debugger code to a separate file. Add more tests. (Yegappan Lakshmanan, closes #4285)
author Bram Moolenaar <Bram@vim.org>
date Sun, 21 Apr 2019 11:45:07 +0200
parents 415185e2c970
children b3e93a05c3ca
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 exists right away it's not a real leak.

source shared.vim

func Test_job_start_fails()
  if has('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
  endif
endfunc