summaryrefslogtreecommitdiff
path: root/src/testdir/test_recover.vim
blob: 2e34985fedcdf4f771383d52fed1a3f816bce2ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
" 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.