comparison src/testdir/test_partial.vim @ 21765:08940efa6b4e v8.2.1432

patch 8.2.1432: various inconsistencies in test files Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 12 18:50:36 2020 +0200 patch 8.2.1432: various inconsistencies in test files 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)
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Aug 2020 19:00:08 +0200
parents 94f05de75e9f
children 86eb4aba16c3
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
1 " Test binding arguments to a Funcref. 1 " Test binding arguments to a Funcref.
2 2
3 source check.vim
4
3 func MyFunc(arg1, arg2, arg3) 5 func MyFunc(arg1, arg2, arg3)
4 return a:arg1 . '/' . a:arg2 . '/' . a:arg3 6 return a:arg1 . '/' . a:arg2 . '/' . a:arg3
5 endfunc 7 endfunc
6 8
7 func MySort(up, one, two) 9 func MySort(up, one, two)
233 call assert_true(v:errmsg, v:exception) 235 call assert_true(v:errmsg, v:exception)
234 endtry 236 endtry
235 endfunc 237 endfunc
236 238
237 func Test_bind_in_python() 239 func Test_bind_in_python()
238 if has('python') 240 CheckFeature python
239 let g:d = {} 241 let g:d = {}
240 function g:d.test2() 242 function g:d.test2()
241 endfunction 243 endfunction
242 python import vim 244 python import vim
243 try 245 try
244 call assert_equal(pyeval('vim.bindeval("g:d.test2")'), g:d.test2) 246 call assert_equal(pyeval('vim.bindeval("g:d.test2")'), g:d.test2)
245 catch 247 catch
246 call assert_true(v:false, v:exception) 248 call assert_true(v:false, v:exception)
247 endtry 249 endtry
248 endif
249 endfunc 250 endfunc
250 251
251 " This caused double free on exit if EXITFREE is defined. 252 " This caused double free on exit if EXITFREE is defined.
252 func Test_cyclic_list_arg() 253 func Test_cyclic_list_arg()
253 let l = [] 254 let l = []
268 269
269 func Ignored3(job1, job2, status) 270 func Ignored3(job1, job2, status)
270 endfunc 271 endfunc
271 272
272 func Test_cycle_partial_job() 273 func Test_cycle_partial_job()
273 if has('job') 274 CheckFeature job
274 let job = job_start('echo') 275 let job = job_start('echo')
275 call job_setoptions(job, {'exit_cb': function('Ignored3', [job])}) 276 call job_setoptions(job, {'exit_cb': function('Ignored3', [job])})
276 unlet job 277 unlet job
277 endif
278 endfunc 278 endfunc
279 279
280 func Ignored2(job, status) 280 func Ignored2(job, status)
281 endfunc 281 endfunc
282 282
283 func Test_ref_job_partial_dict() 283 func Test_ref_job_partial_dict()
284 if has('job') 284 CheckFeature job
285 let g:ref_job = job_start('echo') 285 let g:ref_job = job_start('echo')
286 let d = {'a': 'b'} 286 let d = {'a': 'b'}
287 call job_setoptions(g:ref_job, {'exit_cb': function('Ignored2', [], d)}) 287 call job_setoptions(g:ref_job, {'exit_cb': function('Ignored2', [], d)})
288 call test_garbagecollect_now() 288 call test_garbagecollect_now()
289 endif
290 endfunc 289 endfunc
291 290
292 func Test_auto_partial_rebind() 291 func Test_auto_partial_rebind()
293 let dict1 = {'name': 'dict1'} 292 let dict1 = {'name': 'dict1'}
294 func! dict1.f1() 293 func! dict1.f1()