mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)
Problem: Exepath() doesn't work for "bin/cat".
Solution: Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
closes vim/vim#4710)
d08b8c4c04
Fixes https://github.com/neovim/neovim/issues/10554.
This commit is contained in:
@@ -887,6 +887,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
|
||||
|
||||
|
Reference in New Issue
Block a user