comparison src/testdir/test_ins_complete.vim @ 19932:2c4d9ca33769 v8.2.0522

patch 8.2.0522: several errors are not tested for Commit: https://github.com/vim/vim/commit/ee4e0c1e9a81cb5d96e0060203a9033c2f28588e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 6 21:35:05 2020 +0200 patch 8.2.0522: several errors are not tested for Problem: Several errors are not tested for. Solution: Add tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5892)
author Bram Moolenaar <Bram@vim.org>
date Mon, 06 Apr 2020 21:45:31 +0200
parents 283c8bc6a8e2
children c087099e9163
comparison
equal deleted inserted replaced
19931:db6b095f4073 19932:2c4d9ca33769
463 call delete('Xtags') 463 call delete('Xtags')
464 call delete('Xfoo') 464 call delete('Xfoo')
465 set tags& 465 set tags&
466 %bwipe! 466 %bwipe!
467 endfunc 467 endfunc
468
469 " Test for 'completefunc' deleting text
470 func Test_completefunc_error()
471 new
472 func CompleteFunc(findstart, base)
473 if a:findstart == 1
474 normal dd
475 return col('.') - 1
476 endif
477 return ['a', 'b']
478 endfunc
479 set completefunc=CompleteFunc
480 call setline(1, ['', 'abcd', ''])
481 call assert_fails('exe "normal 2G$a\<C-X>\<C-U>"', 'E840:')
482 set completefunc&
483 delfunc CompleteFunc
484 close!
485 endfunc
486
487 " vim: shiftwidth=2 sts=2 expandtab