Mercurial > vim
comparison src/testdir/test_ins_complete.vim @ 19055:8645b73b3645 v8.2.0088
patch 8.2.0088: insufficient tests for tags; bug in using extra tag field
Commit: https://github.com/vim/vim/commit/830c1afc9d2cd5819a05c71d4e0b1f748a8c0519
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 5 20:35:44 2020 +0100
patch 8.2.0088: insufficient tests for tags; bug in using extra tag field
Problem: Insufficient tests for tags; bug in using extra tag field when
using an ex command to position the cursor.
Solution: Fix the bug, add more tests. (Yegappan Lakshmanan, closes #5439)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Jan 2020 20:45:05 +0100 |
parents | a3fce2763e83 |
children | 0ee48dc3f8bc |
comparison
equal
deleted
inserted
replaced
19054:ebee9e4dac40 | 19055:8645b73b3645 |
---|---|
430 | 430 |
431 call term_sendkeys(buf, "\<Esc>") | 431 call term_sendkeys(buf, "\<Esc>") |
432 call StopVimInTerminal(buf) | 432 call StopVimInTerminal(buf) |
433 call delete('Xpreviewscript') | 433 call delete('Xpreviewscript') |
434 endfunc | 434 endfunc |
435 | |
436 " Test for inserting the tag search pattern in insert mode | |
437 func Test_ins_compl_tag_sft() | |
438 call writefile([ | |
439 \ "!_TAG_FILE_ENCODING\tutf-8\t//", | |
440 \ "first\tXfoo\t/^int first() {}$/", | |
441 \ "second\tXfoo\t/^int second() {}$/", | |
442 \ "third\tXfoo\t/^int third() {}$/"], | |
443 \ 'Xtags') | |
444 set tags=Xtags | |
445 let code =<< trim [CODE] | |
446 int first() {} | |
447 int second() {} | |
448 int third() {} | |
449 [CODE] | |
450 call writefile(code, 'Xfoo') | |
451 | |
452 enew | |
453 set showfulltag | |
454 exe "normal isec\<C-X>\<C-]>\<C-N>\<CR>" | |
455 call assert_equal('int second() {}', getline(1)) | |
456 set noshowfulltag | |
457 | |
458 call delete('Xtags') | |
459 call delete('Xfoo') | |
460 set tags& | |
461 %bwipe! | |
462 endfunc |