test/old: pass Test_recover_root_dir on Windows (#10207)

* Revert "oldtests: win: keep set dir=/"

This reverts commit 714e0f8bf0.

* test/old: set swap directory to non-existent drive

Appveyor uses Administrator user so it can write anywhere in C:\\.
Neovim creates a directory for the swap file
if the directory does not exist.
D:\\ is the backup/recovery drive so use F:\\ invoke error E303.
This commit is contained in:
Jan Edmund Lazo 2019-07-01 15:51:00 -04:00 committed by Justin M. Keyes
parent 5e4b93a38f
commit ff95e62ff8

View File

@ -6,6 +6,13 @@ func Test_recover_root_dir()
set dir=/
call assert_fails('recover', 'E305:')
close!
if has('win32')
" can write in / directory on MS-Windows
let &directory = 'F:\\'
elseif filewritable('/') == 2
set dir=/notexist/
endif
call assert_fails('split Xtest', 'E303:')
set dir&
endfunc