Patch 9.0.0856

5 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 10, 2022, 1:22:30 PM11/10/22
to vim...@googlegroups.com

Patch 9.0.0856
Problem: MS-Windows: executable not found when running individual test.
Solution: Also look for vimd.exe. (Christopher Plewright, closes #11525)
Files: src/testdir/shared.vim


*** ../vim-9.0.0855/src/testdir/shared.vim 2022-09-03 22:08:07.794560471 +0100
--- src/testdir/shared.vim 2022-11-10 18:20:07.986996167 +0000
***************
*** 231,244 ****
call feedkeys('x', 'nt')
endfunc

" Get $VIMPROG to run the Vim executable.
" The Makefile writes it as the first line in the "vimcmd" file.
func GetVimProg()
! if !filereadable('vimcmd')
! " Assume the script was sourced instead of running "make".
! return '../vim'
endif
! return readfile('vimcmd')[0]
endfunc

let g:valgrind_cnt = 1
--- 231,261 ----
call feedkeys('x', 'nt')
endfunc

+ " Get the name of the Vim executable that we expect has been build in the src
+ " directory.
+ func s:GetJustBuildVimExe()
+ if has("win32")
+ if !filereadable('..\vim.exe') && filereadable('..\vimd.exe')
+ " looks like the debug executable was intentionally build, so use it
+ return '..\vimd.exe'
+ endif
+ return '..\vim.exe'
+ endif
+ return '../vim'
+ endfunc
+
" Get $VIMPROG to run the Vim executable.
" The Makefile writes it as the first line in the "vimcmd" file.
+ " Falls back to the Vim executable in the src directory.
func GetVimProg()
! if filereadable('vimcmd')
! return readfile('vimcmd')[0]
endif
! echo 'Cannot read the "vimcmd" file, falling back to ../vim.'
!
! " Probably the script was sourced instead of running "make".
! " We assume Vim was just build in the src directory then.
! return s:GetJustBuildVimExe()
endfunc

let g:valgrind_cnt = 1
***************
*** 246,261 ****
" Get the command to run Vim, with -u NONE and --not-a-term arguments.
" If there is an argument use it instead of "NONE".
func GetVimCommand(...)
! if !filereadable('vimcmd')
! echo 'Cannot read the "vimcmd" file, falling back to ../vim.'
! if !has("win32")
! let lines = ['../vim']
! else
! let lines = ['..\vim.exe']
! endif
! else
let lines = readfile('vimcmd')
endif
if a:0 == 0
let name = 'NONE'
else
--- 263,275 ----
" Get the command to run Vim, with -u NONE and --not-a-term arguments.
" If there is an argument use it instead of "NONE".
func GetVimCommand(...)
! if filereadable('vimcmd')
let lines = readfile('vimcmd')
+ else
+ echo 'Cannot read the "vimcmd" file, falling back to ../vim.'
+ let lines = [s:GetJustBuildVimExe()]
endif
+
if a:0 == 0
let name = 'NONE'
else
*** ../vim-9.0.0855/src/version.c 2022-11-10 17:05:24.251446759 +0000
--- src/version.c 2022-11-10 17:32:50.425040522 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 856,
/**/

--
Nothing is fool-proof to a sufficiently talented fool.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages