diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-12 18:50:36 +0200 |
commit | 6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 (patch) | |
tree | 0f4129e5f6e049ce5313520239de270cd9389580 /src/testdir/test_partial.vim | |
parent | c3d6e8a46a8fc5de622e8df9dbd25edd03e00c5b (diff) | |
download | vim-git-6d91bcb4d23b5c6a0be72c384beaf385e2d9d606.tar.gz |
patch 8.2.1432: various inconsistencies in test filesv8.2.1432
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
Diffstat (limited to 'src/testdir/test_partial.vim')
-rw-r--r-- | src/testdir/test_partial.vim | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/src/testdir/test_partial.vim b/src/testdir/test_partial.vim index 2fad7b289..392527f16 100644 --- a/src/testdir/test_partial.vim +++ b/src/testdir/test_partial.vim @@ -1,5 +1,7 @@ " Test binding arguments to a Funcref. +source check.vim + func MyFunc(arg1, arg2, arg3) return a:arg1 . '/' . a:arg2 . '/' . a:arg3 endfunc @@ -235,17 +237,16 @@ func Test_redefine_dict_func() endfunc func Test_bind_in_python() - if has('python') - let g:d = {} - function g:d.test2() - endfunction - python import vim - try - call assert_equal(pyeval('vim.bindeval("g:d.test2")'), g:d.test2) - catch - call assert_true(v:false, v:exception) - endtry - endif + CheckFeature python + let g:d = {} + function g:d.test2() + endfunction + python import vim + try + call assert_equal(pyeval('vim.bindeval("g:d.test2")'), g:d.test2) + catch + call assert_true(v:false, v:exception) + endtry endfunc " This caused double free on exit if EXITFREE is defined. @@ -270,23 +271,21 @@ func Ignored3(job1, job2, status) endfunc func Test_cycle_partial_job() - if has('job') - let job = job_start('echo') - call job_setoptions(job, {'exit_cb': function('Ignored3', [job])}) - unlet job - endif + CheckFeature job + let job = job_start('echo') + call job_setoptions(job, {'exit_cb': function('Ignored3', [job])}) + unlet job endfunc func Ignored2(job, status) endfunc func Test_ref_job_partial_dict() - if has('job') - let g:ref_job = job_start('echo') - let d = {'a': 'b'} - call job_setoptions(g:ref_job, {'exit_cb': function('Ignored2', [], d)}) - call test_garbagecollect_now() - endif + CheckFeature job + let g:ref_job = job_start('echo') + let d = {'a': 'b'} + call job_setoptions(g:ref_job, {'exit_cb': function('Ignored2', [], d)}) + call test_garbagecollect_now() endfunc func Test_auto_partial_rebind() |