blob: 33cd54bc5cf6b199f2c72fdec2dcaacd426c0986 [file] [log] [blame]
Bram Moolenaarc525e3a2017-02-18 16:59:02 +01001" Test :recover
2
3func Test_recover_root_dir()
4 " This used to access invalid memory.
5 split Xtest
6 set dir=/
7 call assert_fails('recover', 'E305:')
8 close!
9
Bram Moolenaar80345202017-02-18 22:43:19 +010010 if has('win32')
11 " can write in / directory on MS-Windows
12 set dir=/notexist/
13 endif
Bram Moolenaarc525e3a2017-02-18 16:59:02 +010014 call assert_fails('split Xtest', 'E303:')
15 set dir&
16endfunc
17
18" TODO: move recover tests from test78.in to here.