aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_taglist.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/old/testdir/test_taglist.vim b/test/old/testdir/test_taglist.vim
index 75d28c3ec4..d74bd1e0e1 100644
--- a/test/old/testdir/test_taglist.vim
+++ b/test/old/testdir/test_taglist.vim
@@ -135,6 +135,29 @@ func Test_tagsfile_without_trailing_newline()
set tags&
endfunc
+" Check that specifying a stop directory in 'tags' works properly.
+func Test_tagfiles_stopdir()
+ let save_cwd = getcwd()
+
+ call mkdir('Xtagsdir1/Xtagsdir2/Xtagsdir3', 'pR')
+ call writefile([], 'Xtagsdir1/Xtags', 'D')
+
+ cd Xtagsdir1/
+ let &tags = './Xtags;' .. fnamemodify('./..', ':p')
+ call assert_equal(1, len(tagfiles()))
+
+ cd Xtagsdir2/
+ let &tags = './Xtags;' .. fnamemodify('./..', ':p')
+ call assert_equal(1, len(tagfiles()))
+
+ cd Xtagsdir3/
+ let &tags = './Xtags;' .. fnamemodify('./..', ':p')
+ call assert_equal(0, len(tagfiles()))
+
+ set tags&
+ call chdir(save_cwd)
+endfunc
+
" Test for ignoring comments in a tags file
func Test_tagfile_ignore_comments()
call writefile([