aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/python3_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-05 15:54:41 +0800
committerGitHub <noreply@github.com>2024-03-05 15:54:41 +0800
commit5b312cd5f67646005312d2ebb2ef0d1bc584dcff (patch)
tree0039826e1234701c6f500a1bcd2a1b366eec3c04 /test/functional/provider/python3_spec.lua
parent0ffc9264996573e2e8e4ad787c230ebda6fdf8ce (diff)
downloadrneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.tar.gz
rneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.tar.bz2
rneovim-5b312cd5f67646005312d2ebb2ef0d1bc584dcff.zip
fix(eval): make has('pythonx') work properly (#27739)
Problem: has('pythonx') always returns 1. Solution: Make it the same as has('python3').
Diffstat (limited to 'test/functional/provider/python3_spec.lua')
-rw-r--r--test/functional/provider/python3_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/provider/python3_spec.lua b/test/functional/provider/python3_spec.lua
index 9bde57f777..80b3552e82 100644
--- a/test/functional/provider/python3_spec.lua
+++ b/test/functional/provider/python3_spec.lua
@@ -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)