Skip to content

Commit 0331faf

Browse files
committed
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 #4535)
1 parent 45aa07d commit 0331faf

7 files changed

Lines changed: 14 additions & 1 deletion

File tree

src/testdir/test_autocmd.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ func Test_OptionSet()
11001100

11011101
" Cleanup
11021102
au! OptionSet
1103+
" set tags&
11031104
for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp', 'backupext', 'tags', 'spelllang', 'statusline', 'foldignore', 'cmdheight', 'undolevels', 'wrapmargin', 'foldcolumn', 'wrapscan', 'autoread', 'cindent', 'cursorcolumn']
11041105
exe printf(":set %s&vim", opt)
11051106
endfor

src/testdir/test_cmdline.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ func Test_getcompletion()
378378
endfor
379379

380380
call delete('Xtags')
381+
set tags&
381382

382383
call assert_fails('call getcompletion("", "burp")', 'E475:')
383384
endfunc

src/testdir/test_options.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ func Test_set_completion()
237237

238238
call feedkeys(":set tags=./\\\\ dif\<C-A>\<C-B>\"\<CR>", 'tx')
239239
call assert_equal('"set tags=./\\ diff diffexpr diffopt', @:)
240+
set tags&
240241
endfunc
241242

242243
func Test_set_errors()

src/testdir/test_tagcase.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ func Test_tagcase()
4444
endfor
4545

4646
call delete('Xtags')
47+
set tags&
4748
set ic&
4849
setg tc&
4950
setl tc&

src/testdir/test_tagjump.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ func Test_cancel_ptjump()
2020
call assert_equal(2, winnr('$'))
2121

2222
call delete('Xtags')
23+
set tags&
2324
quit
2425
endfunc
2526

@@ -104,6 +105,7 @@ func Test_tagjump_switchbuf()
104105
enew | only
105106
call delete('Xfile1')
106107
call delete('Xtags')
108+
set tags&
107109
set switchbuf&vim
108110
endfunc
109111

@@ -431,7 +433,7 @@ func Test_tagnr_recall()
431433
tag
432434
call assert_equal(bufname('%'), 'Xtest.h')
433435

434-
set tag&
436+
set tags&
435437
call delete('Xtags')
436438
bwipe Xtest.h
437439
bwipe Xtest.c
@@ -467,6 +469,7 @@ func Test_tag_line_toolong()
467469
endtry
468470
call assert_equal('Ignoring long line in tags file', split(execute('messages'), '\n')[-1])
469471
call delete('Xtags')
472+
set tags&
470473
let &verbose = old_vbs
471474
endfunc
472475

src/testdir/test_taglist.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ func Test_taglist()
3030
call assert_equal('call cursor(3, 4)', cmd[0]['cmd'])
3131

3232
call delete('Xtags')
33+
set tags&
3334
bwipe
3435
endfunc
3536

@@ -50,6 +51,7 @@ func Test_taglist_native_etags()
5051
\ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
5152

5253
call delete('Xtags')
54+
set tags&
5355
endfunc
5456

5557
func Test_taglist_ctags_etags()
@@ -69,6 +71,7 @@ func Test_taglist_ctags_etags()
6971
\ map(taglist('set_signals'), {i, v -> [v.name, v.cmd]}))
7072

7173
call delete('Xtags')
74+
set tags&
7275
endfunc
7376

7477
func Test_tags_too_long()
@@ -110,4 +113,5 @@ func Test_tagsfile_without_trailing_newline()
110113
call assert_equal('Foo', tl[0].name)
111114

112115
call delete('Xtags')
116+
set tags&
113117
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static char *(features[]) =
777777

778778
static int included_patches[] =
779779
{ /* Add new patch number below this line */
780+
/**/
781+
1546,
780782
/**/
781783
1545,
782784
/**/

0 commit comments

Comments
 (0)