From f5dd30948e67b0bfbfe0f1023a9b0c8a0b20b486 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Sun, 16 Mar 2025 20:49:05 +0800 Subject: fix(checkhealth): handle nested lua/ directory #32918 Problem: :checkhealth fails if plugin has nested "lua/" directory Solution: trim `{runtimepath}/lua` from fullpath to get subpath (`./**/{health, health/init.lua}`) --- test/functional/plugin/health_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/functional/plugin') diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua index 406b5c3c16..1f754b9685 100644 --- a/test/functional/plugin/health_spec.lua +++ b/test/functional/plugin/health_spec.lua @@ -212,6 +212,18 @@ describe('vim.health', function() n.expect([[ ERROR: No healthchecks found.]]) end) + + it('nested lua/ directory', function() + command('checkhealth lua') + n.expect([[ + + ============================================================================== + test_plug.lua: require("test_plug.lua.health").check() + + nested lua/ directory ~ + - OK everything is ok + ]]) + end) end) end) -- cgit