diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-10-07 10:29:57 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-10-07 10:30:29 -0400 |
commit | f25f42bf03b6cdc50dd85ec1dddd693aa71b6f50 (patch) | |
tree | 8616a2cf47e047c4f8f1c9a60bce9af38de8b537 | |
parent | ab3a4a489625f7d5af681e07b9339a9ce95ce986 (diff) | |
download | rneovim-f25f42bf03b6cdc50dd85ec1dddd693aa71b6f50.tar.gz rneovim-f25f42bf03b6cdc50dd85ec1dddd693aa71b6f50.tar.bz2 rneovim-f25f42bf03b6cdc50dd85ec1dddd693aa71b6f50.zip |
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)
https://github.com/vim/vim/commit/8295666dc2c65e42135b91d5c61e2a140d002333
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 92d966a334..acbbd522db 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -864,6 +864,19 @@ func Test_filewritable() bw! 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() let hostname_vim = hostname() if has('unix') |