From 2fbd477f1df0161e3870e7abd81a47fc15bb8dcd Mon Sep 17 00:00:00 2001 From: user <17591696+sand4rt@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:58:42 +0200 Subject: [PATCH 1/2] test: tabs --- tests/test_closing.lua | 2 +- tests/test_opening.lua | 2 +- tests/test_tabs.lua | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 tests/test_tabs.lua diff --git a/tests/test_closing.lua b/tests/test_closing.lua index 622eba4..97e3564 100644 --- a/tests/test_closing.lua +++ b/tests/test_closing.lua @@ -10,7 +10,7 @@ local T = MiniTest.new_set({ }, }) -T["close side buffers on last main quit"] = function() +T["close zen side buffers on last main quit"] = function() Helpers.expect.layout(child, { type = "row", children = { diff --git a/tests/test_opening.lua b/tests/test_opening.lua index 7bcb3bb..febdee5 100644 --- a/tests/test_opening.lua +++ b/tests/test_opening.lua @@ -10,7 +10,7 @@ local T = MiniTest.new_set({ }, }) -T["open side buffers on startup"] = function() +T["open zen side buffers on startup"] = function() Helpers.expect.layout(child, { type = "row", children = { diff --git a/tests/test_tabs.lua b/tests/test_tabs.lua new file mode 100644 index 0000000..ea4579f --- /dev/null +++ b/tests/test_tabs.lua @@ -0,0 +1,26 @@ +local Helpers = dofile("tests/scripts/helpers.lua") +local child = MiniTest.new_child_neovim() + +local T = MiniTest.new_set({ + hooks = { + pre_case = function() + child.restart({ "-u", "tests/scripts/init_with_zen.lua" }) + end, + post_once = child.stop, + }, +}) + +T["open zen buffers on a new tab"] = function() + child.cmd("tabnew") + + Helpers.expect.layout(child, { + type = "row", + children = { + { type = "leaf", filetype = "zen-left", buftype = "nofile", width = 46, height = 49 }, + { type = "leaf", filetype = "", buftype = "", width = 146, height = 49 }, + { type = "leaf", filetype = "zen-right", buftype = "nofile", width = 46, height = 49 }, + }, + }) +end + +return T From 16fa6679b363ec0190b947c67c799807dda7751f Mon Sep 17 00:00:00 2001 From: Sander <17591696+sand4rt@users.noreply.github.com> Date: Thu, 16 Apr 2026 23:02:29 +0200 Subject: [PATCH 2/2] Update tests/test_tabs.lua Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tests/test_tabs.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_tabs.lua b/tests/test_tabs.lua index ea4579f..6c04693 100644 --- a/tests/test_tabs.lua +++ b/tests/test_tabs.lua @@ -10,7 +10,7 @@ local T = MiniTest.new_set({ }, }) -T["open zen buffers on a new tab"] = function() +T["open zen side buffers on a new tab"] = function() child.cmd("tabnew") Helpers.expect.layout(child, {