2022-08-22 19:38:53 -07:00
|
|
|
|
|
|
|
" 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
|
|
|
|
|
2022-11-06 08:07:57 -07:00
|
|
|
func Test_viminfo_oldfiles_newfile()
|
|
|
|
let v:oldfiles = v:_null_list
|
|
|
|
call assert_equal("\nNo old files", execute('oldfiles'))
|
|
|
|
endfunc
|
|
|
|
|
2022-08-22 19:38:53 -07:00
|
|
|
" vim: shiftwidth=2 sts=2 expandtab
|