aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_mksession.vim
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/testdir/test_mksession.vim')
-rw-r--r--src/nvim/testdir/test_mksession.vim23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim
index 215065f941..8ef8bbc23a 100644
--- a/src/nvim/testdir/test_mksession.vim
+++ b/src/nvim/testdir/test_mksession.vim
@@ -128,6 +128,7 @@ func Test_mksession()
call delete('Xtest_mks.out')
call delete(tmpfile)
let &wrap = wrap_save
+ set sessionoptions&
endfunc
func Test_mksession_winheight()
@@ -154,7 +155,7 @@ func Test_mksession_rtp()
return
endif
new
- set sessionoptions+=options
+ set sessionoptions&vi
let _rtp=&rtp
" Make a real long (invalid) runtimepath value,
" that should exceed PATH_MAX (hopefully)
@@ -174,6 +175,7 @@ func Test_mksession_rtp()
call assert_equal(expected, li)
call delete('Xtest_mks.out')
+ set sessionoptions&
endfunc
" Verify that arglist is stored correctly to the session file.
@@ -218,6 +220,25 @@ func Test_mksession_one_buffer_two_windows()
call delete('Xtest_mks.out')
endfunc
+if has('extra_search')
+
+func Test_mksession_hlsearch()
+ set sessionoptions&vi
+ set hlsearch
+ mksession! Xtest_mks.out
+ nohlsearch
+ source Xtest_mks.out
+ call assert_equal(1, v:hlsearch, 'session should restore search highlighting state')
+ nohlsearch
+ 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
+
" Test :mkview with a file argument.
func Test_mkview_file()
" Create a view with line number and a fold.