aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mason-core
diff options
context:
space:
mode:
authorWill Lillis <wlillis@umass.edu>2024-01-21 12:26:29 -0500
committerGitHub <noreply@github.com>2024-01-21 18:26:29 +0100
commitc7e67059bb8ce7e126263471645c531d961b5e1d (patch)
tree3b5e12b6dda6917df2df8a03b9fb5df0ac048db5 /tests/mason-core
parenttests: add nvim v0.9.5 to test matrix (#1594) (diff)
downloadmason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar.gz
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar.bz2
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar.lz
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar.xz
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.tar.zst
mason-c7e67059bb8ce7e126263471645c531d961b5e1d.zip
fix(ui): don't indent empty lines (#1597)
Diffstat (limited to 'tests/mason-core')
-rw-r--r--tests/mason-core/ui_spec.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/mason-core/ui_spec.lua b/tests/mason-core/ui_spec.lua
index 40a8b888..17087045 100644
--- a/tests/mason-core/ui_spec.lua
+++ b/tests/mason-core/ui_spec.lua
@@ -323,4 +323,24 @@ describe("integration test", function()
)
end)
)
+
+ it("should not apply cascading styles to empty lines", function()
+ local render_output = display._render_node(
+ {
+ win_width = 120,
+ },
+ Ui.CascadingStyleNode({ "INDENT" }, {
+ Ui.HlTextNode {
+ {
+ { "Hello World!", "MyHighlightGroup" },
+ },
+ {
+ { "", "" },
+ },
+ },
+ })
+ )
+
+ assert.same({ " Hello World!", "" }, render_output.lines)
+ end)
end)