neovim/test/old/testdir/test_viminfo.vim
dundargoc af23d17388
test: move oldtests to test directory (#22536)
The new oldtest directory is in test/old/testdir. The reason for this is
that many tests have hardcoded the parent directory name to be
'testdir'.
2023-03-07 11:13:04 +08:00

27 lines
753 B
VimL

" Test for errors in setting 'viminfo'
func Test_viminfo_option_error()
" Missing number
call assert_fails('set viminfo=\"', 'E526:')
for c in split("'/:<@s", '\zs')
call assert_fails('set viminfo=' .. c, 'E526:')
endfor
" Missing comma
call assert_fails('set viminfo=%10!', 'E527:')
call assert_fails('set viminfo=!%10', 'E527:')
call assert_fails('set viminfo=h%10', 'E527:')
call assert_fails('set viminfo=c%10', 'E527:')
call assert_fails('set viminfo=:10%10', 'E527:')
" Missing ' setting
call assert_fails('set viminfo=%10', 'E528:')
endfunc
func Test_viminfo_oldfiles_newfile()
let v:oldfiles = v:_null_list
call assert_equal("\nNo old files", execute('oldfiles'))
endfunc
" vim: shiftwidth=2 sts=2 expandtab