diff options
Diffstat (limited to 'src/testdir/test_taglist.vim')
-rw-r--r-- | src/testdir/test_taglist.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_taglist.vim b/src/testdir/test_taglist.vim index 1d662c08d..fa159d73d 100644 --- a/src/testdir/test_taglist.vim +++ b/src/testdir/test_taglist.vim @@ -1,5 +1,7 @@ " test taglist(), tagfiles() functions and :tags command +source view_util.vim + func Test_taglist() call writefile([ \ "FFoo\tXfoo\t1", @@ -216,3 +218,21 @@ func Test_format_error() set tags& call delete('Xtags') endfunc + +" Test for :tag command completion with 'wildoptions' set to 'tagfile' +func Test_tag_complete_wildoptions() + call writefile(["foo\ta.c\t10;\"\tf", "bar\tb.c\t20;\"\td"], 'Xtags') + set tags=Xtags + set wildoptions=tagfile + + call feedkeys(":tag \<C-D>\<C-R>=Screenline(&lines - 1)\<CR> : " + \ .. "\<C-R>=Screenline(&lines - 2)\<CR>\<C-B>\"\<CR>", 'xt') + + call assert_equal('"tag bar d b.c : foo f a.c', @:) + + call delete('Xtags') + set wildoptions& + set tags& +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |