view src/testdir/test_job_fails.vim @ 22902:1bde09eef44a v8.2.1998

patch 8.2.1998: terminal Cmd test sometimes fails to close popup Commit: https://github.com/vim/vim/commit/27f4f6baeeb25e1597a7827f4a509ecf2eb8e6e2 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 16 21:02:28 2020 +0100 patch 8.2.1998: terminal Cmd test sometimes fails to close popup Problem: Terminal Cmd test sometimes fails to close popup. Solution: Add "term_finish" option.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Nov 2020 21:15:03 +0100
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