Mercurial > vim
comparison src/testdir/test_partial.vim @ 9764:e0b783389bea v7.4.2157
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 5 19:31:57 2016 +0200
patch 7.4.2157
Problem: Test_job_start_fails() is expected to report memory leaks, making
it hard to see other leaks in test_partial.
Solution: Move Test_job_start_fails() to a separate test file.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 05 Aug 2016 19:45:05 +0200 |
parents | 058e5ea0400e |
children | 95ad2692dec0 |
comparison
equal
deleted
inserted
replaced
9763:7fba2e73bc86 | 9764:e0b783389bea |
---|---|
1 " Test binding arguments to a Funcref. | 1 " Test binding arguments to a Funcref. |
2 | 2 |
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 10m | |
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 | |
25 func MyFunc(arg1, arg2, arg3) | 3 func MyFunc(arg1, arg2, arg3) |
26 return a:arg1 . '/' . a:arg2 . '/' . a:arg3 | 4 return a:arg1 . '/' . a:arg2 . '/' . a:arg3 |
27 endfunc | 5 endfunc |
28 | 6 |
29 func MySort(up, one, two) | 7 func MySort(up, one, two) |