test/win: executable(), exepath() #9516

This commit is contained in:
erw7
2019-01-18 14:11:40 +09:00
committed by Justin M. Keyes
parent 35c2ceba96
commit 3be5aa1a34
4 changed files with 68 additions and 13 deletions

View File

@@ -276,7 +276,7 @@ bool os_can_exe(const char_u *name, char_u **abspath, bool use_path)
}
#ifdef WIN32
/// Returns true if extension of `name` is executalbe file exteinsion.
/// Returns true if extension of `name` is executable file exteinsion.
static bool is_extension_executable(const char *name)
FUNC_ATTR_NONNULL_ALL
{

View File

@@ -881,8 +881,8 @@ func Test_Executable()
call assert_equal(1, executable('notepad'))
call assert_equal(1, executable('notepad.exe'))
call assert_equal(0, executable('notepad.exe.exe'))
call assert_equal(1, executable('shell32.dll'))
call assert_equal(1, executable('win.ini'))
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('nodogshere'))