test: update tests to work with 'hidden'

This commit is contained in:
Gregory Anders
2021-08-17 21:30:58 -06:00
parent d417e67e59
commit d8ab8cccd0
25 changed files with 48 additions and 32 deletions

Binary file not shown.

View File

@@ -998,6 +998,7 @@ func Test_bufunload_all()
endfunc
au BufUnload * call UnloadAllBufs()
au VimLeave * call writefile(['Test Finished'], 'Xout')
set nohidden
edit Xxx1
split Xxx2
q

View File

@@ -33,7 +33,7 @@ func Test_command_count_0()
delcommand RangeBuffers
delcommand RangeBuffersAll
set hidden&
set nohidden
set swapfile&
endfunc

View File

@@ -540,7 +540,7 @@ func Test_diffopt_hiddenoff()
bwipe!
bwipe!
set hidden& diffopt&
set nohidden diffopt&
endfunc
func Test_diffoff_hidden()
@@ -577,7 +577,7 @@ func Test_diffoff_hidden()
bwipe!
bwipe!
set hidden& diffopt&
set nohidden diffopt&
endfunc
func Test_setting_cursor()

View File

@@ -145,7 +145,7 @@ func Test_gf_visual()
bwipe!
call delete('Xtest_gf_visual')
set hidden&
set nohidden
endfunc
func Test_gf_error()

View File

@@ -95,7 +95,7 @@ func Test_ins_complete()
call delete('Xtest11.one')
call delete('Xtest11.two')
call delete('Xtestdata')
set cpt& cot& def& tags& tagbsearch& hidden&
set cpt& cot& def& tags& tagbsearch& nohidden
cd ..
call delete('Xdir', 'rf')
endfunc

View File

@@ -35,7 +35,6 @@ endfunc
" Tests for setting the '[,'] marks when joining lines.
func Test_join_marks()
set joinspaces
enew
call append(0, [
\ "\t\tO sodales, ludite, vos qui",
@@ -52,9 +51,8 @@ func Test_join_marks()
/^This line/;'}-join
call assert_equal([0, 4, 11, 0], getpos("'["))
call assert_equal([0, 4, 67, 0], getpos("']"))
call assert_equal([0, 4, 66, 0], getpos("']"))
enew!
set nojoinspaces
endfunc
" Test for joining lines and marks in them

View File

@@ -307,7 +307,7 @@ func Test_mksession_buffer_count()
call delete('Xbaz')
call delete('Xtest_mks.out')
%bwipe!
set hidden&
set nohidden
endfunc
if has('extra_search')

View File

@@ -539,7 +539,7 @@ func Test_copy_winopt()
call assert_equal(4,&numberwidth)
bw!
set hidden&
set nohidden
endfunc
func Test_shortmess_F()

View File

@@ -170,7 +170,7 @@ func Test_tag_symbolic()
call assert_equal('Xtest.c', expand('%:t'))
call assert_equal(2, col('.'))
set hidden&
set nohidden
set tags&
enew!
call delete('Xtags')

View File

@@ -608,7 +608,7 @@ func Test_window_prevwin()
" reset
q
call delete('tmp.txt')
set hidden&vim autoread&vim
set nohidden autoread&vim
delfunc Fun_RenewFile
endfunc