Mercurial > vim
diff src/testdir/test_taglist.vim @ 19679:9199f34d838e v8.2.0396
patch 8.2.0396: cmdexpand.c insufficiently tested
Commit: https://github.com/vim/vim/commit/24ebd83e030e1c6f9a6be1f06232756ba4d00a8c
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 16 21:25:24 2020 +0100
patch 8.2.0396: cmdexpand.c insufficiently tested
Problem: Cmdexpand.c insufficiently tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5789)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 16 Mar 2020 21:30:04 +0100 |
parents | 5ce724c60c4c |
children | 546bdeef35f1 |
line wrap: on
line diff
--- 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