Skip to content

test: window splits - #7

Merged
sand4rt merged 2 commits into
mainfrom
split-tests
Apr 16, 2026
Merged

sand4rt merged 2 commits into
mainfrom
split-tests

Conversation

@sand4rt

@sand4rt sand4rt commented Apr 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 16, 2026 20:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds coverage for how the Zen side buffers behave when creating/closing window splits, expanding the existing MiniTest-based test suite around opening/closing/resizing behavior.

Changes:

  • Add new tests/test_splits.lua covering :vsplit interactions with Zen side buffers (close on open, reopen on close).
  • Add a :vsplit + resize-below-min-width scenario to ensure side buffers do not reopen when the editor is too narrow.
  • Introduce an hsplit test set (currently with a placeholder test).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_splits.lua
T["hsplit"] = MiniTest.new_set({})

T["hsplit"]["opening does not close the side buffers"] = function()
-- TODO

Copilot AI Apr 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test case is currently a placeholder (no setup/actions/assertions), so it will always pass without validating the intended hsplit behavior. Either implement the assertions for how hsplit should interact with zen side buffers, or remove the empty test until the behavior is ready to be tested.

Suggested change
-- TODO
child.cmd("edit test.lua")
child.cmd("split test2.lua")
Helpers.expect.layout(child, {
type = "row",
children = {
{ type = "leaf", filetype = "zen-left", buftype = "nofile", width = 46, height = 50 },
{
type = "col",
children = {
{ type = "leaf", filetype = "lua", buftype = "", width = 146, height = 25 },
{ type = "leaf", filetype = "lua", buftype = "", width = 146, height = 24 },
},
},
{ type = "leaf", filetype = "zen-right", buftype = "nofile", width = 46, height = 50 },
},
})

Copilot uses AI. Check for mistakes.
Comment thread tests/test_splits.lua Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 21:01
@sand4rt
sand4rt merged commit a16f168 into main Apr 16, 2026
3 checks passed
@sand4rt
sand4rt deleted the split-tests branch April 16, 2026 21:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants