diff options
| author | James McCoy <jamessan@jamessan.com> | 2017-04-07 16:08:58 -0400 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2017-04-07 16:18:04 -0400 |
| commit | 20dc04470e00a369d2ba917a22b06ef2d173953f (patch) | |
| tree | bbafc8b525f5c2d88fe0c30053c8a14178cbaab4 /src/nvim/testdir | |
| parent | 13352c00f1909d9296c5f276a3735f5e6f231b39 (diff) | |
| download | rneovim-20dc04470e00a369d2ba917a22b06ef2d173953f.tar.gz rneovim-20dc04470e00a369d2ba917a22b06ef2d173953f.tar.bz2 rneovim-20dc04470e00a369d2ba917a22b06ef2d173953f.zip | |
vim-patch:8.0.0499
Problem: taglist() does not prioritize tags for a buffer.
Solution: Add an optional buffer argument. (Duncan McDougall, closes vim/vim#1194)
https://github.com/vim/vim/commit/c6aafbaf3ea755e3ab4ee2e3045911126a08b038
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_taglist.vim | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index baf49b7ff7..99d9835996 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -26,6 +26,7 @@ source test_tabline.vim " source test_tabpage.vim source test_tagcase.vim source test_tagjump.vim +source test_taglist.vim source test_true_false.vim source test_unlet.vim source test_utf8.vim diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim new file mode 100644 index 0000000000..b89b25eae2 --- /dev/null +++ b/src/nvim/testdir/test_taglist.vim @@ -0,0 +1,21 @@ +" test 'taglist' function + +func Test_taglist() + call writefile([ + \ "FFoo\tXfoo\t1", + \ "FBar\tXfoo\t2", + \ "BFoo\tXbar\t1", + \ "BBar\tXbar\t2" + \ ], 'Xtags') + set tags=Xtags + split Xtext + + call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name})) + call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name})) + call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name})) + call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name})) + + call delete('Xtags') + bwipe +endfunc + |