aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/python_spec.lua
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro+github@gmail.com>2019-01-12 00:52:12 +0100
committerGitHub <noreply@github.com>2019-01-12 00:52:12 +0100
commitdb3c797c6b3ce9c4f0f50ae22acde0c1aac60725 (patch)
tree64d9a43c8f5a09949c152319e2dcd6384a268bd8 /test/functional/provider/python_spec.lua
parent8853fca1fdc5ee3a2aea3eb3e772e091946a3a71 (diff)
downloadrneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.tar.gz
rneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.tar.bz2
rneovim-db3c797c6b3ce9c4f0f50ae22acde0c1aac60725.zip
provider: improve error message if provider is missing (#9487)
Move `has_eval_provider()` check to `eval_call_provider()` to make sure that every code path calls it first. Previously we would, when pynvim was missing, get a nice error message for `:python3 1`, but not for `:py3file blah`. Fixes https://github.com/neovim/neovim/issues/9485
Diffstat (limited to 'test/functional/provider/python_spec.lua')
-rw-r--r--test/functional/provider/python_spec.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/provider/python_spec.lua b/test/functional/provider/python_spec.lua
index 15df76d2f6..869cfd1721 100644
--- a/test/functional/provider/python_spec.lua
+++ b/test/functional/provider/python_spec.lua
@@ -19,8 +19,9 @@ do
clear()
if missing_provider('python') then
it(':python reports E319 if provider is missing', function()
- expect_err([[Vim%(python%):E319: No "python" provider found.*]],
- command, 'python print("foo")')
+ local expected = [[Vim%(py.*%):E319: No "python" provider found.*]]
+ expect_err(expected, command, 'py print("foo")')
+ expect_err(expected, command, 'pyfile foo')
end)
pending('Python 2 (or the pynvim module) is broken/missing', function() end)
return