diff options
Diffstat (limited to 'tests/mason-core/ui_spec.lua')
| -rw-r--r-- | tests/mason-core/ui_spec.lua | 20 |
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) |
