fix(eval): make has('pythonx') work properly (#27739)

Problem:  has('pythonx') always returns 1.
Solution: Make it the same as has('python3').
This commit is contained in:
zeertzjq
2024-03-05 15:54:41 +08:00
committed by GitHub
parent 0ffc926499
commit 5b312cd5f6
2 changed files with 9 additions and 1 deletions

View File

@@ -20,6 +20,12 @@ do
matches(expected, pcall_err(command, 'py3 print("foo")'))
matches(expected, pcall_err(command, 'py3file foo'))
end)
it('feature test when Python 3 provider is missing', function()
eq(0, eval('has("python3")'))
eq(0, eval('has("python3_compiled")'))
eq(0, eval('has("python3_dynamic")'))
eq(0, eval('has("pythonx")'))
end)
pending(
string.format('Python 3 (or the pynvim module) is broken/missing (%s)', reason),
function() end
@@ -38,6 +44,7 @@ describe('python3 provider', function()
eq(1, eval('has("python3")'))
eq(1, eval('has("python3_compiled")'))
eq(1, eval('has("python3_dynamic")'))
eq(1, eval('has("pythonx")'))
eq(0, eval('has("python3_dynamic_")'))
eq(0, eval('has("python3_")'))
end)