1
0
forked from aniani/vim
Files
vim/src/testdir/test_recover.vim
Bram Moolenaar 2a0b06def4 patch 8.0.0600: test_recover fails on some systems
Problem:    test_recover fails on some systems.
Solution:   Explicitly check if "/" is writable. (Ken Takata)
2017-05-18 16:23:43 +02:00

19 lines
397 B
VimL

" Test :recover
func Test_recover_root_dir()
" This used to access invalid memory.
split Xtest
set dir=/
call assert_fails('recover', 'E305:')
close!
if has('win32') || filewritable('/') == 2
" can write in / directory on MS-Windows
set dir=/notexist/
endif
call assert_fails('split Xtest', 'E303:')
set dir&
endfunc
" TODO: move recover tests from test78.in to here.