Problem: tests: still preferring python2 over python3
Solution: prefer Python 3 when picking a Python program in Vim tests,
by checking for the more specific python version first and
only when python3 not found, check for the python binary
(Yee Cheng Chin)
Most OSes have Python 3 mapped to `python3` instead of `python`. Vim
tests should prioritize using that instead of Python 2 in case that is
still installed on the host system.
closes: #15986
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
if !(has('job') || executable('pkill'))
return ''
endif
- if executable('python')
- let s:python = 'python'
- elseif executable('python3')
+ if executable('python3')
let s:python = 'python3'
+ elseif executable('python')
+ let s:python = 'python'
else
return ''
end
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 841,
/**/
840,
/**/