aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/shada/history_spec.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/shada/history_spec.lua b/test/functional/shada/history_spec.lua
index 595938bfb2..c4d39bd547 100644
--- a/test/functional/shada/history_spec.lua
+++ b/test/functional/shada/history_spec.lua
@@ -114,6 +114,31 @@ describe('ShaDa support code', function()
eq({0, 2, 3, 0}, nvim_eval('getpos(".")'))
end)
+ it('saves v:hlsearch=1', function()
+ nvim_command('set hlsearch')
+ nvim_feed('/test\n')
+ nvim_command('qall')
+ reset()
+ eq(1, nvim_eval('v:hlsearch'))
+ end)
+
+ it('saves v:hlsearch=0 with :nohl', function()
+ nvim_command('set hlsearch')
+ nvim_feed('/test\n')
+ nvim_command('nohlsearch')
+ nvim_command('qall')
+ reset()
+ eq(0, nvim_eval('v:hlsearch'))
+ end)
+
+ it('saves v:hlsearch=0 with :set viminfo-=h', function()
+ nvim_command('set hlsearch viminfo-=h')
+ nvim_feed('/test\n')
+ nvim_command('qall')
+ reset()
+ eq(0, nvim_eval('v:hlsearch'))
+ end)
+
it('dumps and loads last substitute pattern and replacement string', function()
nvim_eval('setline(".", ["foo", "bar"])')
nvim_command('%s/f/g/g')