patch 8.0.1819: swap file warning for file with non-existing directory

Problem:    Swap file warning for a file in a non-existing directory, if there
            is another with the same file name. (Juergen Weigert)
Solution:   When expanding the file name fails compare the file names.
diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim
index 1c4965e..da5da2d 100644
--- a/src/testdir/test_swap.vim
+++ b/src/testdir/test_swap.vim
@@ -82,3 +82,18 @@
     call delete('Xtest')
   endtry
 endfunc
+
+func Test_missing_dir()
+  call mkdir('Xswapdir')
+  exe 'set directory=' . getcwd() . '/Xswapdir'
+
+  call assert_equal('', glob('foo'))
+  call assert_equal('', glob('bar'))
+  edit foo/x.txt
+  " This should not give a warning for an existing swap file.
+  split bar/x.txt
+  only
+
+  set directory&
+  call delete('Xswapdir', 'rf')
+endfunc