aboutsummaryrefslogtreecommitdiff
path: root/test/functional/shada/history_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
committerJosh Rahm <rahm@google.com>2022-07-18 19:37:18 +0000
commit308e1940dcd64aa6c344c403d4f9e0dda58d9c5c (patch)
tree35fe43e01755e0f312650667004487a44d6b7941 /test/functional/shada/history_spec.lua
parent96a00c7c588b2f38a2424aeeb4ea3581d370bf2d (diff)
parente8c94697bcbe23a5c7b07c292b90a6b70aadfa87 (diff)
downloadrneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.gz
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.tar.bz2
rneovim-308e1940dcd64aa6c344c403d4f9e0dda58d9c5c.zip
Merge remote-tracking branch 'upstream/master' into rahm
Diffstat (limited to 'test/functional/shada/history_spec.lua')
-rw-r--r--test/functional/shada/history_spec.lua21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/functional/shada/history_spec.lua b/test/functional/shada/history_spec.lua
index 84cc34c7cc..d1daf6c7cc 100644
--- a/test/functional/shada/history_spec.lua
+++ b/test/functional/shada/history_spec.lua
@@ -3,6 +3,7 @@ local helpers = require('test.functional.helpers')(after_each)
local nvim_command, funcs, meths, nvim_feed, eq =
helpers.command, helpers.funcs, helpers.meths, helpers.feed, helpers.eq
local assert_alive = helpers.assert_alive
+local expect_exit = helpers.expect_exit
local shada_helpers = require('test.functional.shada.helpers')
local reset, clear = shada_helpers.reset, shada_helpers.clear
@@ -25,13 +26,13 @@ describe('ShaDa support code', function()
nvim_command('set shada=\'0 history=2')
nvim_feed(':" Test\n')
nvim_feed(':" Test 2\n')
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
reset()
nvim_command('set shada=\'0 history=2')
nvim_command('rshada')
eq('" Test 2', funcs.histget(':', -1))
eq('" Test', funcs.histget(':', -2))
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
end)
it('respects &history when dumping',
@@ -138,7 +139,7 @@ describe('ShaDa support code', function()
nvim_command('set hlsearch shada-=h')
nvim_feed('/test\n')
eq(1, meths.get_vvar('hlsearch'))
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
reset()
eq(1, meths.get_vvar('hlsearch'))
end)
@@ -147,7 +148,7 @@ describe('ShaDa support code', function()
nvim_command('set hlsearch shada-=h')
nvim_feed('/test\n')
nvim_command('nohlsearch')
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
reset()
eq(0, meths.get_vvar('hlsearch'))
end)
@@ -156,7 +157,7 @@ describe('ShaDa support code', function()
nvim_command('set hlsearch')
nvim_feed('/test\n')
eq(1, meths.get_vvar('hlsearch'))
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
reset()
eq(0, meths.get_vvar('hlsearch'))
end)
@@ -175,7 +176,7 @@ describe('ShaDa support code', function()
it('dumps and loads history with UTF-8 characters', function()
reset()
nvim_feed(':echo "«"\n')
- nvim_command('qall')
+ expect_exit(nvim_command, 'qall')
reset()
eq('echo "«"', funcs.histget(':', -1))
end)
@@ -183,7 +184,7 @@ describe('ShaDa support code', function()
it('dumps and loads replacement with UTF-8 characters',
function()
nvim_command('substitute/./«/ge')
- nvim_command('qall!')
+ expect_exit(nvim_command, 'qall!')
reset()
funcs.setline('.', {'.'})
nvim_command('&')
@@ -193,7 +194,7 @@ describe('ShaDa support code', function()
it('dumps and loads substitute pattern with UTF-8 characters',
function()
nvim_command('substitute/«/./ge')
- nvim_command('qall!')
+ expect_exit(nvim_command, 'qall!')
reset()
funcs.setline('.', {'«\171'})
nvim_command('&')
@@ -204,7 +205,7 @@ describe('ShaDa support code', function()
function()
nvim_command('silent! /«/')
nvim_command('set shada+=/0')
- nvim_command('qall!')
+ expect_exit(nvim_command, 'qall!')
reset()
funcs.setline('.', {'\171«'})
nvim_command('~&')
@@ -217,7 +218,7 @@ describe('ShaDa support code', function()
-- \171 is U+00AB LEFT-POINTING DOUBLE ANGLE QUOTATION MARK in latin1
nvim_command('silent! /\171/')
nvim_command('set shada+=/0')
- nvim_command('qall!')
+ expect_exit(nvim_command, 'qall!')
reset()
funcs.setline('.', {'\171«'})
nvim_command('~&')