aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorJavier Lopez <graulopezjavier@gmail.com>2022-05-31 13:10:18 -0500
committerGitHub <noreply@github.com>2022-05-31 11:10:18 -0700
commite6652821bd32e4ff8d62a0b67fc2041a5f41e252 (patch)
treecc5106c44d65f8f504a4f3ba6654b918a6f33c13 /test/functional
parent7380ebfc17723662f6fe1e38372f54b3d67fe082 (diff)
downloadrneovim-e6652821bd32e4ff8d62a0b67fc2041a5f41e252.tar.gz
rneovim-e6652821bd32e4ff8d62a0b67fc2041a5f41e252.tar.bz2
rneovim-e6652821bd32e4ff8d62a0b67fc2041a5f41e252.zip
refactor(checkhealth)!: rename to vim.health, move logic to Lua #18720
- Complete function: There was lots of unnecessary C code for the complete function, therefore moving it to Lua and use all the plumbing we have in place to retrieve the results. - Moving the module: It's important we keep nvim lua modules name spaced, avoids conflict with plugins, luarocks, etc.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/fixtures/lua/test_plug/health/init.lua9
-rw-r--r--test/functional/fixtures/lua/test_plug/submodule/health.lua9
-rw-r--r--test/functional/fixtures/lua/test_plug/submodule_failed/health.lua7
3 files changed, 11 insertions, 14 deletions
diff --git a/test/functional/fixtures/lua/test_plug/health/init.lua b/test/functional/fixtures/lua/test_plug/health/init.lua
index d07632cff4..58162d4515 100644
--- a/test/functional/fixtures/lua/test_plug/health/init.lua
+++ b/test/functional/fixtures/lua/test_plug/health/init.lua
@@ -1,11 +1,10 @@
local M = {}
-local health = require("health")
M.check = function()
- health.report_start("report 1")
- health.report_ok("everything is fine")
- health.report_start("report 2")
- health.report_ok("nothing to see here")
+ vim.health.report_start("report 1")
+ vim.health.report_ok("everything is fine")
+ vim.health.report_start("report 2")
+ vim.health.report_ok("nothing to see here")
end
return M
diff --git a/test/functional/fixtures/lua/test_plug/submodule/health.lua b/test/functional/fixtures/lua/test_plug/submodule/health.lua
index d07632cff4..58162d4515 100644
--- a/test/functional/fixtures/lua/test_plug/submodule/health.lua
+++ b/test/functional/fixtures/lua/test_plug/submodule/health.lua
@@ -1,11 +1,10 @@
local M = {}
-local health = require("health")
M.check = function()
- health.report_start("report 1")
- health.report_ok("everything is fine")
- health.report_start("report 2")
- health.report_ok("nothing to see here")
+ vim.health.report_start("report 1")
+ vim.health.report_ok("everything is fine")
+ vim.health.report_start("report 2")
+ vim.health.report_ok("nothing to see here")
end
return M
diff --git a/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua
index 3a8af6ebb2..ee5f4e404b 100644
--- a/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua
+++ b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua
@@ -1,10 +1,9 @@
local M = {}
-local health = require("health")
M.check = function()
- health.report_start("report 1")
- health.report_ok("everything is fine")
- health.report_warn("About to add a number to nil")
+ vim.health.report_start("report 1")
+ vim.health.report_ok("everything is fine")
+ vim.health.report_warn("About to add a number to nil")
local a = nil + 2
return a
end