view src/testdir/test_recover.vim @ 11432:0cafb01af1b6 v8.0.0600

patch 8.0.0600: test_recover fails on some systems commit https://github.com/vim/vim/commit/2a0b06def49198aef45ef173f524a638a700f9c9 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 18 16:23:43 2017 +0200 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)
author Christian Brabandt <cb@256bit.org>
date Thu, 18 May 2017 16:30:03 +0200
parents cc3f6ad092c2
children 4767939d10cc
line wrap: on
line source

" 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.