diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-10-06 15:18:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-10-06 15:18:45 +0200 |
commit | 8295666dc2c65e42135b91d5c61e2a140d002333 (patch) | |
tree | 59b7a9be4212dc4b28b6e39ded79c051627049e4 /src/testdir/test_functions.vim | |
parent | 7554c548a493cba50b2d0ea3521cac14f28a1f07 (diff) |
patch 8.1.0453: MS-Windows: executable() is not reliablev8.1.0453
Problem: MS-Windows: executable() is not reliable.
Solution: Use $PATHEXT properly. (Yasuhiro Matsumoto, closes #3412)
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r-- | src/testdir/test_functions.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index cc82f8191c..17f7c1905e 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -800,6 +800,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') |