aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-06-16 14:31:58 +0200
committerDaniel Hahler <git@thequod.de>2019-06-16 19:51:12 +0200
commitc6602df0151a18554e81af34d600851d3db292bd (patch)
tree1719f5546cd4946e922ba318f245c9b0382ef26d /src
parent3d8e8cb889ebac02feb63fe8d8bd08b7d0e95371 (diff)
downloadrneovim-c6602df0151a18554e81af34d600851d3db292bd.tar.gz
rneovim-c6602df0151a18554e81af34d600851d3db292bd.tar.bz2
rneovim-c6602df0151a18554e81af34d600851d3db292bd.zip
vim-patch:8.1.1546: in some tests 'tags' is set but not restored
Problem: In some tests 'tags' is set but not restored. (Daniel Hahler) Solution: Restore 'tags'. (closes vim/vim#4535) https://github.com/vim/vim/commit/0331faf71200a274377e1569fcda4f00c9cf3e2a
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_autocmd.vim3
-rw-r--r--src/nvim/testdir/test_cmdline.vim1
-rw-r--r--src/nvim/testdir/test_options.vim1
-rw-r--r--src/nvim/testdir/test_tagcase.vim1
-rw-r--r--src/nvim/testdir/test_tagjump.vim5
-rw-r--r--src/nvim/testdir/test_taglist.vim4
6 files changed, 13 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index d66e237e45..ddd0643feb 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -635,7 +635,8 @@ func Test_OptionSet()
" Cleanup
au! OptionSet
- for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp']
+ " set tags&
+ for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp', 'tags']
exe printf(":set %s&vim", opt)
endfor
call test_override('starting', 0)
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 75832a798c..e0d4df48a9 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -294,6 +294,7 @@ func Test_getcompletion()
endfor
call delete('Xtags')
+ set tags&
call assert_fails('call getcompletion("", "burp")', 'E475:')
endfunc
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 25d9a426f7..da87a22f1e 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -225,6 +225,7 @@ func Test_set_completion()
call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx')
call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:)
+ set tags&
let &shellslash = shellslash
endfunc
diff --git a/src/nvim/testdir/test_tagcase.vim b/src/nvim/testdir/test_tagcase.vim
index 833cb9f990..53c08ccf1e 100644
--- a/src/nvim/testdir/test_tagcase.vim
+++ b/src/nvim/testdir/test_tagcase.vim
@@ -44,6 +44,7 @@ func Test_tagcase()
endfor
call delete('Xtags')
+ set tags&
set ic&
setg tc&
setl tc&
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim
index 21ea00cab7..ce527a5e1d 100644
--- a/src/nvim/testdir/test_tagjump.vim
+++ b/src/nvim/testdir/test_tagjump.vim
@@ -20,6 +20,7 @@ func Test_cancel_ptjump()
call assert_equal(2, winnr('$'))
call delete('Xtags')
+ set tags&
quit
endfunc
@@ -104,6 +105,7 @@ func Test_tagjump_switchbuf()
enew | only
call delete('Xfile1')
call delete('Xtags')
+ set tags&
set switchbuf&vim
endfunc
@@ -424,7 +426,7 @@ func Test_tagnr_recall()
tag
call assert_equal(bufname('%'), 'Xtest.h')
- set tag&
+ set tags&
call delete('Xtags')
bwipe Xtest.h
bwipe Xtest.c
@@ -460,6 +462,7 @@ func Test_tag_line_toolong()
endtry
call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1])
call delete('Xtags')
+ set tags&
let &verbose = old_vbs
endfunc
diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim
index 42cfc89808..fb8c6c85cd 100644
--- a/src/nvim/testdir/test_taglist.vim
+++ b/src/nvim/testdir/test_taglist.vim
@@ -16,6 +16,7 @@ func Test_taglist()
call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
call delete('Xtags')
+ set tags&
bwipe
endfunc
@@ -36,6 +37,7 @@ func Test_taglist_native_etags()
\ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
call delete('Xtags')
+ set tags&
endfunc
func Test_taglist_ctags_etags()
@@ -55,6 +57,7 @@ func Test_taglist_ctags_etags()
\ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
call delete('Xtags')
+ set tags&
endfunc
func Test_tags_too_long()
@@ -73,6 +76,7 @@ func Test_tagsfile_without_trailing_newline()
call assert_equal('Foo', tl[0].name)
call delete('Xtags')
+ set tags&
endfunc
func Test_tagfiles()