File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2086,6 +2086,7 @@ test_arglist \
20862086 test_history \
20872087 test_increment \
20882088 test_increment_dbcs \
2089+ test_job_fails \
20892090 test_join \
20902091 test_json \
20912092 test_jumps \
Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ NEW_TESTS = test_arglist.res \
176176 test_history.res \
177177 test_increment.res \
178178 test_increment_dbcs.res \
179+ test_job_fails.res \
179180 test_json.res \
180181 test_langmap.res \
181182 test_man.res \
Original file line number Diff line number Diff line change 1+ " This test is in a separate file, because it usually causes reports for memory
2+ " leaks under valgrind. That is because when fork/exec fails memory is not
3+ " freed. Since the process exists right away it's not a real leak.
4+
5+ source shared.vim
6+
7+ func Test_job_start_fails ()
8+ if has (' job' )
9+ let g: job = job_start (' axdfxsdf' )
10+ if has (' unix' )
11+ call WaitFor (' job_status(g:job) == "dead"' )
12+ call assert_equal (' dead' , job_status (g: job ))
13+ else
14+ call WaitFor (' job_status(g:job) == "fail"' )
15+ call assert_equal (' fail' , job_status (g: job ))
16+ endif
17+ unlet g: job
18+ endif
19+ endfunc
Original file line number Diff line number Diff line change 11" Test binding arguments to a Funcref.
22
3- " NOTE: This function may cause memory leaks to be reported.
4- " That is because when fork/exec fails memory is not freed. Since the process
5- " exists right away it's not a real leak.
6- func Test_job_start_fails ()
7- if has (' job' )
8- let job = job_start (' axdfxsdf' )
9- for i in range (100 )
10- let status = job_status (job)
11- if status == ' dead' || status == ' fail'
12- break
13- endif
14- sleep 10 m
15- endfor
16- if has (' unix' )
17- call assert_equal (' dead' , job_status (job))
18- else
19- call assert_equal (' fail' , job_status (job))
20- endif
21- unlet job
22- endif
23- endfunc
24-
253func MyFunc (arg1, arg2, arg3)
264 return a: arg1 . ' /' . a: arg2 . ' /' . a: arg3
275endfunc
Original file line number Diff line number Diff line change @@ -763,6 +763,8 @@ static char *(features[]) =
763763
764764static int included_patches [] =
765765{ /* Add new patch number below this line */
766+ /**/
767+ 2157 ,
766768/**/
767769 2156 ,
768770/**/
You can’t perform that action at this time.
0 commit comments