annotate src/testdir/test_job_fails.vim @ 19724:b3e93a05c3ca v8.2.0418

patch 8.2.0418: code in eval.c not sufficiently covered by tests Commit: https://github.com/vim/vim/commit/8b633135106dda8605463b780573c45b00c22afe Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 20 18:20:51 2020 +0100 patch 8.2.0418: code in eval.c not sufficiently covered by tests Problem: Code in eval.c not sufficiently covered by tests. Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5815)
author Bram Moolenaar <Bram@vim.org>
date Fri, 20 Mar 2020 18:30:05 +0100
parents 415185e2c970
children 08940efa6b4e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9764
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " This test is in a separate file, because it usually causes reports for memory
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " leaks under valgrind. That is because when fork/exec fails memory is not
19724
b3e93a05c3ca patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 13798
diff changeset
3 " freed. Since the process exits right away it's not a real leak.
9764
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 source shared.vim
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 func Test_job_start_fails()
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 if has('job')
12765
c1347c968d31 patch 8.0.1260: using global variables for WaitFor()
Christian Brabandt <cb@256bit.org>
parents: 9764
diff changeset
9 let job = job_start('axdfxsdf')
9764
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 if has('unix')
13798
415185e2c970 patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents: 12765
diff changeset
11 call WaitForAssert({-> assert_equal("dead", job_status(job))})
9764
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 else
13798
415185e2c970 patch 8.0.1771: in tests, when WaitFor() fails it doesn't say why
Christian Brabandt <cb@256bit.org>
parents: 12765
diff changeset
13 call WaitForAssert({-> assert_equal("fail", job_status(job))})
9764
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 endif
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 endif
e0b783389bea commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 endfunc
19724
b3e93a05c3ca patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 13798
diff changeset
17
b3e93a05c3ca patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 13798
diff changeset
18 " vim: shiftwidth=2 sts=2 expandtab