1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2019-07-24 14:59:45 +02:00
parent 06029a857a
commit d08b8c4c04
4 changed files with 13 additions and 5 deletions

View File

@@ -990,6 +990,14 @@ func Test_Executable()
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