vim-patch:9.1.1073: tests: test_compiler fails on Windows without Maven

Problem:  tests: test_compiler fails on Windows without Maven.
Solution: Add Xspotbugs directory to $PATH when mvn is not available
          (zeertzjq).

closes: vim/vim#16576

23da16d3d0
This commit is contained in:
zeertzjq
2025-02-04 06:45:14 +08:00
parent 89c2945148
commit ca8694a69d

View File

@@ -411,8 +411,10 @@ func Test_compiler_spotbugs_properties()
" TEST INTEGRATION WITH A SUPPORTED COMPILER PLUGIN.
if filereadable($VIMRUNTIME .. '/compiler/maven.vim')
let save_PATH = $PATH
if !executable('mvn')
if has('win32')
let $PATH = 'Xspotbugs;' .. $PATH
" This is what ":help executable()" suggests.
call writefile([], 'Xspotbugs/mvn.cmd')
else
@@ -700,6 +702,7 @@ func Test_compiler_spotbugs_properties()
bwipeout
setlocal makeprg=
let $PATH = save_PATH
endif
filetype plugin off