aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-05-07 11:42:21 +0200
committerGitHub <noreply@github.com>2019-05-07 11:42:21 +0200
commitbc395b4fd4bb4973f22c68763bf000ea4cff4ccb (patch)
treec1855b5d165b3efcf395f8a6c3238ea08ec54c12 /src/nvim/testdir
parent400ee59247eae62990baf30c7802bc8effb3704a (diff)
parent4423759d0360acda87dd829f361957d55748dab5 (diff)
downloadrneovim-bc395b4fd4bb4973f22c68763bf000ea4cff4ccb.tar.gz
rneovim-bc395b4fd4bb4973f22c68763bf000ea4cff4ccb.tar.bz2
rneovim-bc395b4fd4bb4973f22c68763bf000ea4cff4ccb.zip
Merge #9979 from janlazo/vim-8.0.0876
vim-patch:8.0.{876,1144},8.1.0133
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_taglist.vim25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim
index f4e939254a..ea0a6b9678 100644
--- a/src/nvim/testdir/test_taglist.vim
+++ b/src/nvim/testdir/test_taglist.vim
@@ -1,4 +1,4 @@
-" test 'taglist' function and :tags command
+" test taglist(), tagfiles() functions and :tags command
func Test_taglist()
call writefile([
@@ -74,3 +74,26 @@ func Test_tagsfile_without_trailing_newline()
call delete('Xtags')
endfunc
+
+func Test_tagfiles()
+ call assert_equal([], tagfiles())
+
+ call writefile(["FFoo\tXfoo\t1"], 'Xtags1')
+ call writefile(["FBar\tXbar\t1"], 'Xtags2')
+ set tags=Xtags1,Xtags2
+ call assert_equal(['Xtags1', 'Xtags2'], tagfiles())
+
+ help
+ let tf = tagfiles()
+ call assert_equal(1, len(tf))
+ call assert_equal(fnamemodify(expand('$VIMRUNTIME/doc/tags'), ':p:gs?\\?/?'),
+ \ fnamemodify(tf[0], ':p:gs?\\?/?'))
+ helpclose
+ call assert_equal(['Xtags1', 'Xtags2'], tagfiles())
+ set tags&
+ call assert_equal([], tagfiles())
+
+ call delete('Xtags1')
+ call delete('Xtags2')
+ bd
+endfunc