mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
test(old): reorder test_mksession.vim to match upstream (#26021)
This commit is contained in:
@@ -168,7 +168,6 @@ func Test_mksession_rtp()
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
new
|
new
|
||||||
set sessionoptions+=options
|
|
||||||
let _rtp=&rtp
|
let _rtp=&rtp
|
||||||
" Make a real long (invalid) runtimepath value,
|
" Make a real long (invalid) runtimepath value,
|
||||||
" that should exceed PATH_MAX (hopefully)
|
" that should exceed PATH_MAX (hopefully)
|
||||||
@@ -188,7 +187,6 @@ func Test_mksession_rtp()
|
|||||||
call assert_equal(expected, li)
|
call assert_equal(expected, li)
|
||||||
|
|
||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
set sessionoptions&
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_mksession_arglist()
|
func Test_mksession_arglist()
|
||||||
@@ -208,7 +206,6 @@ func Test_mksession_arglist()
|
|||||||
argdel *
|
argdel *
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
func Test_mksession_one_buffer_two_windows()
|
func Test_mksession_one_buffer_two_windows()
|
||||||
edit Xtest1
|
edit Xtest1
|
||||||
new Xtest2
|
new Xtest2
|
||||||
@@ -275,21 +272,6 @@ func Test_mksession_blank_tabs()
|
|||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_mksession_blank_windows()
|
|
||||||
split
|
|
||||||
split
|
|
||||||
split
|
|
||||||
3 wincmd w
|
|
||||||
mksession! Xtest_mks.out
|
|
||||||
split
|
|
||||||
split
|
|
||||||
2 wincmd w
|
|
||||||
source Xtest_mks.out
|
|
||||||
call assert_equal(4, winnr('$'), 'session restore should restore number of windows')
|
|
||||||
call assert_equal(3, winnr(), 'session restore should restore the active window')
|
|
||||||
call delete('Xtest_mks.out')
|
|
||||||
endfunc
|
|
||||||
|
|
||||||
func Test_mksession_buffer_count()
|
func Test_mksession_buffer_count()
|
||||||
set hidden
|
set hidden
|
||||||
|
|
||||||
@@ -310,7 +292,7 @@ func Test_mksession_buffer_count()
|
|||||||
call delete('Xbaz')
|
call delete('Xbaz')
|
||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
%bwipe!
|
%bwipe!
|
||||||
set nohidden
|
set hidden&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_mksession_buffer_order()
|
func Test_mksession_buffer_order()
|
||||||
@@ -341,7 +323,6 @@ endfunc
|
|||||||
if has('extra_search')
|
if has('extra_search')
|
||||||
|
|
||||||
func Test_mksession_hlsearch()
|
func Test_mksession_hlsearch()
|
||||||
set sessionoptions+=options
|
|
||||||
set hlsearch
|
set hlsearch
|
||||||
mksession! Xtest_mks.out
|
mksession! Xtest_mks.out
|
||||||
nohlsearch
|
nohlsearch
|
||||||
@@ -351,12 +332,27 @@ func Test_mksession_hlsearch()
|
|||||||
mksession! Xtest_mks.out
|
mksession! Xtest_mks.out
|
||||||
source Xtest_mks.out
|
source Xtest_mks.out
|
||||||
call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
|
call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
|
||||||
set sessionoptions&
|
|
||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
func Test_mksession_blank_windows()
|
||||||
|
split
|
||||||
|
split
|
||||||
|
split
|
||||||
|
3 wincmd w
|
||||||
|
mksession! Xtest_mks.out
|
||||||
|
split
|
||||||
|
split
|
||||||
|
2 wincmd w
|
||||||
|
source Xtest_mks.out
|
||||||
|
call assert_equal(4, winnr('$'), 'session restore should restore number of windows')
|
||||||
|
call assert_equal(3, winnr(), 'session restore should restore the active window')
|
||||||
|
call delete('Xtest_mks.out')
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_mkview_open_folds()
|
func Test_mkview_open_folds()
|
||||||
enew!
|
enew!
|
||||||
|
|
||||||
@@ -689,7 +685,6 @@ endfunc
|
|||||||
|
|
||||||
" Test for mksession with a named scratch buffer
|
" Test for mksession with a named scratch buffer
|
||||||
func Test_mksession_scratch()
|
func Test_mksession_scratch()
|
||||||
set sessionoptions+=options
|
|
||||||
enew | only
|
enew | only
|
||||||
file Xscratch
|
file Xscratch
|
||||||
set buftype=nofile
|
set buftype=nofile
|
||||||
@@ -700,7 +695,6 @@ func Test_mksession_scratch()
|
|||||||
call assert_equal('nofile', &buftype)
|
call assert_equal('nofile', &buftype)
|
||||||
%bwipe
|
%bwipe
|
||||||
call delete('Xtest_mks.out')
|
call delete('Xtest_mks.out')
|
||||||
set sessionoptions&
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for mksession with fold options
|
" Test for mksession with fold options
|
||||||
|
Reference in New Issue
Block a user