Mercurial > vim
view src/testdir/test_job_fails.vim @ 13798:415185e2c970 v8.0.1771
patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why
commit https://github.com/vim/vim/commit/50182fa84e20a0547f3e2bd6683ef799fcd27855
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 28 21:34:40 2018 +0200
patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why
Problem: In tests, when WaitFor() fails it doesn't say why. (James McCoy)
Solution: Add WaitForAssert(), which produces an assert error when it fails.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 28 Apr 2018 21:45:06 +0200 |
parents | c1347c968d31 |
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