aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/shada/shada_spec.lua12
-rw-r--r--test/old/testdir/test_search.vim1
2 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua
index 78fe19b984..0d196072e7 100644
--- a/test/functional/shada/shada_spec.lua
+++ b/test/functional/shada/shada_spec.lua
@@ -250,6 +250,18 @@ describe('ShaDa support code', function()
end
end)
+ it('":wshada/:rshada [filename]" works when shadafile=NONE', function()
+ nvim_command('set shadafile=NONE')
+ nvim_command('wshada ' .. shada_fname)
+ eq(1, read_shada_file(shada_fname)[1].type)
+
+ wshada('Some text file')
+ eq(
+ 'Vim(rshada):E576: Error while reading ShaDa file: last entry specified that it occupies 109 bytes, but file ended earlier',
+ t.pcall_err(n.command, 'rshada ' .. shada_fname)
+ )
+ end)
+
it('does not crash when ShaDa file directory is not writable', function()
skip(is_os('win'))
diff --git a/test/old/testdir/test_search.vim b/test/old/testdir/test_search.vim
index b62c2b2e5f..cd36f56f17 100644
--- a/test/old/testdir/test_search.vim
+++ b/test/old/testdir/test_search.vim
@@ -1449,6 +1449,7 @@ endfunc
" Test that there is no crash when there is a last search pattern but no last
" substitute pattern.
func Test_no_last_substitute_pat()
+ throw 'Skipped: TODO: '
" Use viminfo to set the last search pattern to a string and make the last
" substitute pattern the most recent used and make it empty (NULL).
call writefile(['~MSle0/bar', '~MSle0~&'], 'Xviminfo', 'D')