diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-05-07 11:42:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-07 11:42:21 +0200 |
| commit | bc395b4fd4bb4973f22c68763bf000ea4cff4ccb (patch) | |
| tree | c1855b5d165b3efcf395f8a6c3238ea08ec54c12 /src/nvim/testdir | |
| parent | 400ee59247eae62990baf30c7802bc8effb3704a (diff) | |
| parent | 4423759d0360acda87dd829f361957d55748dab5 (diff) | |
| download | rneovim-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.vim | 25 |
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 |