Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
19678:ef2d704798ba | 19679:9199f34d838e |
---|---|
1 " test taglist(), tagfiles() functions and :tags command | 1 " test taglist(), tagfiles() functions and :tags command |
2 | |
3 source view_util.vim | |
2 | 4 |
3 func Test_taglist() | 5 func Test_taglist() |
4 call writefile([ | 6 call writefile([ |
5 \ "FFoo\tXfoo\t1", | 7 \ "FFoo\tXfoo\t1", |
6 \ "FBar\tXfoo\t2", | 8 \ "FBar\tXfoo\t2", |
214 call assert_true(caught_exception) | 216 call assert_true(caught_exception) |
215 | 217 |
216 set tags& | 218 set tags& |
217 call delete('Xtags') | 219 call delete('Xtags') |
218 endfunc | 220 endfunc |
221 | |
222 " Test for :tag command completion with 'wildoptions' set to 'tagfile' | |
223 func Test_tag_complete_wildoptions() | |
224 call writefile(["foo\ta.c\t10;\"\tf", "bar\tb.c\t20;\"\td"], 'Xtags') | |
225 set tags=Xtags | |
226 set wildoptions=tagfile | |
227 | |
228 call feedkeys(":tag \<C-D>\<C-R>=Screenline(&lines - 1)\<CR> : " | |
229 \ .. "\<C-R>=Screenline(&lines - 2)\<CR>\<C-B>\"\<CR>", 'xt') | |
230 | |
231 call assert_equal('"tag bar d b.c : foo f a.c', @:) | |
232 | |
233 call delete('Xtags') | |
234 set wildoptions& | |
235 set tags& | |
236 endfunc | |
237 | |
238 " vim: shiftwidth=2 sts=2 expandtab |