mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0453: MS-Windows: executable() is not reliable
Problem: MS-Windows: executable() is not reliable.
Solution: Use $PATHEXT properly. (Yasuhiro Matsumoto, closes vim/vim#3412)
8295666dc2
This commit is contained in:
parent
ab3a4a4896
commit
f25f42bf03
@ -864,6 +864,19 @@ func Test_filewritable()
|
|||||||
bw!
|
bw!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_Executable()
|
||||||
|
if has('win32')
|
||||||
|
call assert_equal(1, executable('notepad'))
|
||||||
|
call assert_equal(1, executable('notepad.exe'))
|
||||||
|
call assert_equal(0, executable('notepad.exe.exe'))
|
||||||
|
call assert_equal(0, executable('shell32.dll'))
|
||||||
|
call assert_equal(0, executable('win.ini'))
|
||||||
|
elseif has('unix')
|
||||||
|
call assert_equal(1, executable('cat'))
|
||||||
|
call assert_equal(0, executable('dog'))
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_hostname()
|
func Test_hostname()
|
||||||
let hostname_vim = hostname()
|
let hostname_vim = hostname()
|
||||||
if has('unix')
|
if has('unix')
|
||||||
|
Loading…
Reference in New Issue
Block a user