mirror of
https://github.com/neovim/neovim.git
synced 2024-12-24 21:25:04 -07:00
af23d17388
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'.
27 lines
753 B
VimL
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
|