diff options
author | Alexandre Teoi <ateoi@users.noreply.github.com> | 2023-06-06 12:42:26 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-06 08:42:26 -0700 |
commit | 4382d2ed564b80944345785d780cf1b19fb23ba8 (patch) | |
tree | 09e78758b63fa808b86fc12c4ad8f89bde9dca74 /test/functional/plugin/health_spec.lua | |
parent | 9d9af4fe2775a2f74cfc8d7963f0cc768ed08bfa (diff) | |
download | rneovim-4382d2ed564b80944345785d780cf1b19fb23ba8.tar.gz rneovim-4382d2ed564b80944345785d780cf1b19fb23ba8.tar.bz2 rneovim-4382d2ed564b80944345785d780cf1b19fb23ba8.zip |
feat(health): fold successful healthchecks #22866
Problem:
checkhealth can be noisy, but we don't want to omit info.
Solution:
Fold OK results by default, if 'foldenable' is enabled.
Resolves #22796
Diffstat (limited to 'test/functional/plugin/health_spec.lua')
-rw-r--r-- | test/functional/plugin/health_spec.lua | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/functional/plugin/health_spec.lua b/test/functional/plugin/health_spec.lua index 488a213a9e..50b1d03f36 100644 --- a/test/functional/plugin/health_spec.lua +++ b/test/functional/plugin/health_spec.lua @@ -136,7 +136,7 @@ describe('health.vim', function() Bar = { foreground = Screen.colors.LightGrey, background = Screen.colors.DarkGrey }, }) command("checkhealth foo success1") - command("set nowrap laststatus=0") + command("set nofoldenable nowrap laststatus=0") screen:expect{grid=[[ ^ | {Bar:──────────────────────────────────────────────────}| @@ -153,6 +153,22 @@ describe('health.vim', function() ]]} end) + it("fold healthchecks", function() + local screen = Screen.new(50, 7) + screen:attach() + command("checkhealth foo success1") + command("set nowrap laststatus=0") + screen:expect{grid=[[ + ^ | + ──────────────────────────────────────────────────| + +WE 4 lines: foo: ·······························| + ──────────────────────────────────────────────────| + +-- 8 lines: test_plug.success1: require("test_pl| + ~ | + | + ]]} + end) + it("gracefully handles invalid healthcheck", function() command("checkhealth non_existent_healthcheck") -- luacheck: ignore 613 |