patch 8.0.0337: invalid memory access in :recover command

Problem:    Invalid memory access in :recover command.
Solution:   Avoid access before directory name. (Dominique Pelle,
            closes #1488)
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index d43ae4f..ef0edc7 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -34,6 +34,7 @@
 source test_partial.vim
 source test_popup.vim
 source test_put.vim
+source test_recover.vim
 source test_reltime.vim
 source test_searchpos.vim
 source test_set.vim
diff --git a/src/testdir/test_recover.vim b/src/testdir/test_recover.vim
new file mode 100644
index 0000000..aa291b1
--- /dev/null
+++ b/src/testdir/test_recover.vim
@@ -0,0 +1,14 @@
+" Test :recover
+
+func Test_recover_root_dir()
+  " This used to access invalid memory.
+  split Xtest
+  set dir=/
+  call assert_fails('recover', 'E305:')
+  close!
+
+  call assert_fails('split Xtest', 'E303:')
+  set dir&
+endfunc
+
+" TODO: move recover tests from test78.in to here.