aboutsummaryrefslogtreecommitdiff
path: root/test/functional/fixtures/lua
diff options
context:
space:
mode:
authorMatthieu Coudron <teto@users.noreply.github.com>2021-10-05 11:27:07 +0200
committerGitHub <noreply@github.com>2021-10-05 11:27:07 +0200
commit93a7571faba529f7b3e527336e933731eb91bbec (patch)
tree804a61b2ff65eaef7c06a7390768ece5e890142f /test/functional/fixtures/lua
parent655e489e90712cc3c2f06d84a5030c66e5c51d91 (diff)
parent8b43b07333bc8ae9ca347daffb09f2bdf50af3ed (diff)
downloadrneovim-93a7571faba529f7b3e527336e933731eb91bbec.tar.gz
rneovim-93a7571faba529f7b3e527336e933731eb91bbec.tar.bz2
rneovim-93a7571faba529f7b3e527336e933731eb91bbec.zip
Merge pull request #15259 from muniter/muniter/checkhealth-from-lua
feat(checkhealth): support Lua healthchecks
Diffstat (limited to 'test/functional/fixtures/lua')
-rw-r--r--test/functional/fixtures/lua/test_plug/health/init.lua11
-rw-r--r--test/functional/fixtures/lua/test_plug/submodule/health.lua11
-rw-r--r--test/functional/fixtures/lua/test_plug/submodule_failed/health.lua12
3 files changed, 34 insertions, 0 deletions
diff --git a/test/functional/fixtures/lua/test_plug/health/init.lua b/test/functional/fixtures/lua/test_plug/health/init.lua
new file mode 100644
index 0000000000..d07632cff4
--- /dev/null
+++ b/test/functional/fixtures/lua/test_plug/health/init.lua
@@ -0,0 +1,11 @@
+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")
+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
new file mode 100644
index 0000000000..d07632cff4
--- /dev/null
+++ b/test/functional/fixtures/lua/test_plug/submodule/health.lua
@@ -0,0 +1,11 @@
+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")
+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
new file mode 100644
index 0000000000..3a8af6ebb2
--- /dev/null
+++ b/test/functional/fixtures/lua/test_plug/submodule_failed/health.lua
@@ -0,0 +1,12 @@
+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")
+ local a = nil + 2
+ return a
+end
+
+return M