From c98260822699bf622b14caffc908a47039deca51 Mon Sep 17 00:00:00 2001 From: phanium <91544758+phanen@users.noreply.github.com> Date: Mon, 24 Mar 2025 07:30:08 +0800 Subject: test(checkhealth): nested path 'runtimepath' #33034 --- .../fixtures/pack/foo/opt/healthy/lua/nest/health.lua | 6 ++++++ test/functional/plugin/health_spec.lua | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/functional/fixtures/pack/foo/opt/healthy/lua/nest/health.lua diff --git a/test/functional/fixtures/pack/foo/opt/healthy/lua/nest/health.lua b/test/functional/fixtures/pack/foo/opt/healthy/lua/nest/health.lua new file mode 100644 index 0000000000..f1b496db1e --- /dev/null +++ b/test/functional/fixtures/pack/foo/opt/healthy/lua/nest/health.lua @@ -0,0 +1,6 @@ +return { + check = function() + vim.health.start('healthy pack') + vim.health.ok('healthy ok') + end, +} diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua index 1f754b9685..3632774bff 100644 --- a/test/functional/plugin/health_spec.lua +++ b/test/functional/plugin/health_spec.lua @@ -224,6 +224,24 @@ describe('vim.health', function() - OK everything is ok ]]) end) + + it('&rtp can contain nested path (by packadd)', function() + -- re-add to ensure this appears before new nested rtp + command([[set runtimepath-=test/functional/fixtures]]) + command([[set runtimepath+=test/functional/fixtures]]) + command('set packpath+=test/functional/fixtures') + -- set rtp+=test/functional/fixtures/pack/foo/opt/healthy + command('packadd healthy') + command('checkhealth nest') + n.expect([[ + + ============================================================================== + nest: require("nest.health").check() + + healthy pack ~ + - OK healthy ok + ]]) + end) end) end) -- cgit