diff options
author | Daniel Hahler <git@thequod.de> | 2019-07-24 22:23:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 22:23:00 +0200 |
commit | b8fcf62da9261e47821c5e3d369dc4fd58d2b721 (patch) | |
tree | da9e717539657a8bf2b91807d64d72726c663c4f /src/nvim/testdir/test_functions.vim | |
parent | 3566267e753996c441c220c8a109bb4f4b25225c (diff) | |
download | rneovim-b8fcf62da9261e47821c5e3d369dc4fd58d2b721.tar.gz rneovim-b8fcf62da9261e47821c5e3d369dc4fd58d2b721.tar.bz2 rneovim-b8fcf62da9261e47821c5e3d369dc4fd58d2b721.zip |
vim-patch:8.1.1740: exepath() doesn't work for "bin/cat" (#10556)
Problem: Exepath() doesn't work for "bin/cat".
Solution: Check for any path separator. (Daniel Hahler, closes vim/vim#4724,
closes vim/vim#4710)
https://github.com/vim/vim/commit/d08b8c4c04db9433340df38d21f0e26878f28421
Fixes https://github.com/neovim/neovim/issues/10554.
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 615536baef..fab1d7790d 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -887,6 +887,14 @@ func Test_Executable() elseif has('unix') call assert_equal(1, executable('cat')) call assert_equal(0, executable('nodogshere')) + + " get "cat" path and remove the leading / + let catcmd = exepath('cat')[1:] + new + lcd / + call assert_equal(1, executable(catcmd)) + call assert_equal('/' .. catcmd, exepath(catcmd)) + bwipe endif endfunc |