Mercurial > vim
diff src/testdir/shared.vim @ 12602:9359ed49d375 v8.0.1179
patch 8.0.1179: Test_popup_and_window_resize() does not always pass
commit https://github.com/vim/vim/commit/631820536e4084e01bf990f9314ec385b60b21d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 7 20:03:23 2017 +0200
patch 8.0.1179: Test_popup_and_window_resize() does not always pass
Problem: Test_popup_and_window_resize() does not always pass.
Solution: Do not use $VIMPROG, pass the Vim executable in the vimcmd file.
(Ozaki Kiichi, closes #2186)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 07 Oct 2017 20:15:04 +0200 |
parents | 33a900199c25 |
children | 810a4c3d4f7e |
line wrap: on
line diff
--- a/src/testdir/shared.vim +++ b/src/testdir/shared.vim @@ -170,6 +170,15 @@ func s:feedkeys(timer) call feedkeys('x', 'nt') endfunc +" Get $VIMPROG to run Vim executable. +" The Makefile writes it as the first line in the "vimcmd" file. +func GetVimProg() + if !filereadable('vimcmd') + return '' + endif + return readfile('vimcmd')[0] +endfunc + " Get the command to run Vim, with -u NONE and --not-a-term arguments. " If there is an argument use it instead of "NONE". " Returns an empty string on error. @@ -182,7 +191,12 @@ func GetVimCommand(...) else let name = a:1 endif - let cmd = readfile('vimcmd')[0] + " For Unix Makefile writes the command to use in the second line of the + " "vimcmd" file, including environment options. + " Other Makefiles just write the executable in the first line, so fall back + " to that if there is no second line. + let lines = readfile('vimcmd') + let cmd = get(lines, 1, lines[0]) let cmd = substitute(cmd, '-u \f\+', '-u ' . name, '') if cmd !~ '-u '. name let cmd = cmd . ' -u ' . name