aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/health_spec.lua
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2021-10-05 17:37:39 -0500
committerGitHub <noreply@github.com>2021-10-05 15:37:39 -0700
commitacd5e831b6294e54b12c09983bee3da89c0f183a (patch)
treeb8817b289ab051f4df080282e414399d2a45d4c7 /test/functional/plugin/health_spec.lua
parent6a930a9dc4ddf190b528c945f19bc0a0bad2cc29 (diff)
downloadrneovim-acd5e831b6294e54b12c09983bee3da89c0f183a.tar.gz
rneovim-acd5e831b6294e54b12c09983bee3da89c0f183a.tar.bz2
rneovim-acd5e831b6294e54b12c09983bee3da89c0f183a.zip
fix(checkhealth): mitigate issues with duplicate healthchecks #15919
* fix(runtime/health): mitigate issues with duplicate healthchecks Previously if a healthcheck was found as Lua and Vim it was executed both times. This new implementations prefers Lua, therefore if two are found It only runs the Lua one, this way a plugin can mantain both implementations the Lua one with the method `check()` and the autoload function `#check()` (for none HEAD nvim versions). **Note: This will require plugins to use `check()` as the function name, since the autoload function that wraps the lua implementation won't be called** * docs(health): use spaces and don't overuse backtics followup to #15259
Diffstat (limited to 'test/functional/plugin/health_spec.lua')
-rw-r--r--test/functional/plugin/health_spec.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua
index 2a86391e76..45fcf945f4 100644
--- a/test/functional/plugin/health_spec.lua
+++ b/test/functional/plugin/health_spec.lua
@@ -100,8 +100,10 @@ describe('health.vim', function()
]])
end)
- it("lua plugins", function()
+ it("lua plugins, skips vimscript healthchecks with the same name", function()
command("checkhealth test_plug")
+ -- Existing file in test/functional/fixtures/lua/test_plug/autoload/health/test_plug.vim
+ -- and the Lua healthcheck is used instead.
helpers.expect([[
test_plug: require("test_plug.health").check()