patch 8.1.1740: exepath() doesn't work for "bin/cat"

Problem:    Exepath() doesn't work for "bin/cat".
Solution:   Check for any path separator. (Daniel Hahler, closes #4724,
            closes #4710)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 9199ba7..1833113 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -990,6 +990,14 @@
   elseif has('unix')
     call assert_equal(1, executable('cat'))
     call assert_equal(0, executable('nodogshere'))
+
+    " get "cat" path and remove the leading /
+    let catcmd = exepath('cat')[1:]
+    new
+    lcd /
+    call assert_equal(1, executable(catcmd))
+    call assert_equal('/' .. catcmd, exepath(catcmd))
+    bwipe
   endif
 endfunc