comparison src/testdir/test_functions.vim @ 17484:f1fd0b0b335c v8.1.1740

patch 8.1.1740: exepath() doesn't work for "bin/cat" commit https://github.com/vim/vim/commit/d08b8c4c04db9433340df38d21f0e26878f28421 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 24 14:59:45 2019 +0200 patch 8.1.1740: exepath() doesn't work for "bin/cat" Problem: Exepath() doesn't work for "bin/cat". Solution: Check for any path separator. (Daniel Hahler, closes https://github.com/vim/vim/issues/4724, closes #4710)
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Jul 2019 15:00:06 +0200
parents b6de6181e5ab
children 0da9bc55c31a
comparison
equal deleted inserted replaced
17483:63ea3a9ba8cb 17484:f1fd0b0b335c
988 call assert_equal(0, executable('shell32.dll')) 988 call assert_equal(0, executable('shell32.dll'))
989 call assert_equal(0, executable('win.ini')) 989 call assert_equal(0, executable('win.ini'))
990 elseif has('unix') 990 elseif has('unix')
991 call assert_equal(1, executable('cat')) 991 call assert_equal(1, executable('cat'))
992 call assert_equal(0, executable('nodogshere')) 992 call assert_equal(0, executable('nodogshere'))
993
994 " get "cat" path and remove the leading /
995 let catcmd = exepath('cat')[1:]
996 new
997 lcd /
998 call assert_equal(1, executable(catcmd))
999 call assert_equal('/' .. catcmd, exepath(catcmd))
1000 bwipe
993 endif 1001 endif
994 endfunc 1002 endfunc
995 1003
996 func Test_executable_longname() 1004 func Test_executable_longname()
997 if !has('win32') 1005 if !has('win32')