aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-13 12:34:49 +0800
committerGitHub <noreply@github.com>2023-11-13 12:34:49 +0800
commit748eae6bb59be742fddec587f9f8171d9d0c6a9e (patch)
tree09497385841e5911a1507d0e1f8c554219a27661
parentd3582e102b7bd53afb58efb37eca866ec528dfbe (diff)
downloadrneovim-748eae6bb59be742fddec587f9f8171d9d0c6a9e.tar.gz
rneovim-748eae6bb59be742fddec587f9f8171d9d0c6a9e.tar.bz2
rneovim-748eae6bb59be742fddec587f9f8171d9d0c6a9e.zip
test(old): reorder test_mksession.vim to match upstream (#26021)
-rw-r--r--test/old/testdir/test_mksession.vim40
1 files changed, 17 insertions, 23 deletions
diff --git a/test/old/testdir/test_mksession.vim b/test/old/testdir/test_mksession.vim
index eebdd2f398..369929e3a0 100644
--- a/test/old/testdir/test_mksession.vim
+++ b/test/old/testdir/test_mksession.vim
@@ -168,7 +168,6 @@ func Test_mksession_rtp()
return
endif
new
- set sessionoptions+=options
let _rtp=&rtp
" Make a real long (invalid) runtimepath value,
" that should exceed PATH_MAX (hopefully)
@@ -188,7 +187,6 @@ func Test_mksession_rtp()
call assert_equal(expected, li)
call delete('Xtest_mks.out')
- set sessionoptions&
endfunc
func Test_mksession_arglist()
@@ -208,7 +206,6 @@ func Test_mksession_arglist()
argdel *
endfunc
-
func Test_mksession_one_buffer_two_windows()
edit Xtest1
new Xtest2
@@ -275,21 +272,6 @@ func Test_mksession_blank_tabs()
call delete('Xtest_mks.out')
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()
set hidden
@@ -310,7 +292,7 @@ func Test_mksession_buffer_count()
call delete('Xbaz')
call delete('Xtest_mks.out')
%bwipe!
- set nohidden
+ set hidden&
endfunc
func Test_mksession_buffer_order()
@@ -341,7 +323,6 @@ endfunc
if has('extra_search')
func Test_mksession_hlsearch()
- set sessionoptions+=options
set hlsearch
mksession! Xtest_mks.out
nohlsearch
@@ -351,12 +332,27 @@ func Test_mksession_hlsearch()
mksession! Xtest_mks.out
source Xtest_mks.out
call assert_equal(0, v:hlsearch, 'session should restore search highlighting state')
- set sessionoptions&
call delete('Xtest_mks.out')
endfunc
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()
enew!
@@ -689,7 +685,6 @@ endfunc
" Test for mksession with a named scratch buffer
func Test_mksession_scratch()
- set sessionoptions+=options
enew | only
file Xscratch
set buftype=nofile
@@ -700,7 +695,6 @@ func Test_mksession_scratch()
call assert_equal('nofile', &buftype)
%bwipe
call delete('Xtest_mks.out')
- set sessionoptions&
endfunc
" Test for mksession with fold options