view src/testdir/test_job_fails.vim @ 18309:2047cb93eb0c v8.1.2149

patch 8.1.2149: crash when running out of memory very early Commit: https://github.com/vim/vim/commit/e3a22cb1ba057381be3e645479a537f8032f119f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 14 22:01:57 2019 +0200 patch 8.1.2149: crash when running out of memory very early Problem: Crash when running out of memory very early. Solution: Do not use IObuff when it's NULL. (closes https://github.com/vim/vim/issues/5052)
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Oct 2019 22:15:03 +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