summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_ins_complete.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-05 20:35:44 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-05 20:35:44 +0100
commit830c1afc9d2cd5819a05c71d4e0b1f748a8c0519 (patch)
tree6ce97c03e711c4017898dd209e596cb04dc43795 /src/testdir/test_ins_complete.vim
parent61d7c0d52ca40ab8488c36e619d1e46503affd0b (diff)
patch 8.2.0088: insufficient tests for tags; bug in using extra tag fieldv8.2.0088
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)
Diffstat (limited to 'src/testdir/test_ins_complete.vim')
-rw-r--r--src/testdir/test_ins_complete.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim
index bec6ffc6f9..c9d93ceb1e 100644
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -432,3 +432,31 @@ func Test_pum_with_preview_win()
call StopVimInTerminal(buf)
call delete('Xpreviewscript')
endfunc
+
+" Test for inserting the tag search pattern in insert mode
+func Test_ins_compl_tag_sft()
+ call writefile([
+ \ "!_TAG_FILE_ENCODING\tutf-8\t//",
+ \ "first\tXfoo\t/^int first() {}$/",
+ \ "second\tXfoo\t/^int second() {}$/",
+ \ "third\tXfoo\t/^int third() {}$/"],
+ \ 'Xtags')
+ set tags=Xtags
+ let code =<< trim [CODE]
+ int first() {}
+ int second() {}
+ int third() {}
+ [CODE]
+ call writefile(code, 'Xfoo')
+
+ enew
+ set showfulltag
+ exe "normal isec\<C-X>\<C-]>\<C-N>\<CR>"
+ call assert_equal('int second() {}', getline(1))
+ set noshowfulltag
+
+ call delete('Xtags')
+ call delete('Xfoo')
+ set tags&
+ %bwipe!
+endfunc