From 6b2ecc78ac57b4283c0bd746b7cc497f56c7a2b9 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 25 Apr 2024 11:27:34 +0000 Subject: [PATCH] Test more 'select' related indentation cases --- test/indent_spec.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/indent_spec.lua b/test/indent_spec.lua index cee806b..26b9d3b 100644 --- a/test/indent_spec.lua +++ b/test/indent_spec.lua @@ -39,9 +39,13 @@ describe("indent Blueprint:", function() runner:new_line("test/indent/select.bp", { on_line = 1, text = 'default: "value"', indent = 4 }, "default case") runner:new_line("test/indent/select.bp", { on_line = 11, text = '"case": "value"', indent = 4 }, "select case, trailing") runner:new_line("test/indent/select.bp", { on_line = 11, text = 'default: "value"', indent = 4 }, "default case, trailing") + runner:new_line("test/indent/select.bp", { on_line = 11, text = '}', indent = 0 }, "select cases closing delimiter") + runner:new_line("test/indent/select.bp", { on_line = 27, text = ')', indent = 0 }, "select expression closing delimiter") runner:new_line("test/indent/select.bp", { on_line = 16, text = '"case": "value"', indent = 8 }, "select case, alternate formatting") runner:new_line("test/indent/select.bp", { on_line = 16, text = 'default: "value"', indent = 8 }, "default case, alternate formatting") runner:new_line("test/indent/select.bp", { on_line = 26, text = '"case": "value"', indent = 8 }, "select case, trailing, alternate formatting") runner:new_line("test/indent/select.bp", { on_line = 26, text = 'default: "value"', indent = 8 }, "default case, trailing, alternate formatting") + runner:new_line("test/indent/select.bp", { on_line = 26, text = '}', indent = 4 }, "select cases closing delimiter, alternate formatting") + runner:new_line("test/indent/select.bp", { on_line = 27, text = ')', indent = 0 }, "select expression closing delimiter, alternate formatting") end) end)