summaryrefslogtreecommitdiff
path: root/tests/indent
diff options
context:
space:
mode:
authorMunif Tanjim <hello@muniftanjim.dev>2022-02-05 03:08:18 +0600
committerGitHub <noreply@github.com>2022-02-04 22:08:18 +0100
commit11e7ee1d91dcb97f85c3fa98da440595289123fe (patch)
treed8ac0196c197a46e09afc448cb5ed9b0d71e1709 /tests/indent
parent9f69999e2a310d7906eb9039fe3c855630be6962 (diff)
fix(indent): lua - support `@indent_end` (#2454)
Diffstat (limited to 'tests/indent')
-rw-r--r--tests/indent/lua_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/indent/lua_spec.lua b/tests/indent/lua_spec.lua
index d198c5cc..2577e483 100644
--- a/tests/indent/lua_spec.lua
+++ b/tests/indent/lua_spec.lua
@@ -22,7 +22,9 @@ describe("indent Lua:", function()
run:new_line("comment.lua", { on_line = 5, text = "multiline", indent = " " }, "expected failure", XFAIL)
run:new_line("func.lua", { on_line = 1, text = "x = x + 1", indent = 2 })
run:new_line("func.lua", { on_line = 2, text = "y = y + 1", indent = 4 })
+ run:new_line("func.lua", { on_line = 4, text = "y = y + 1", indent = 2 })
run:new_line("func.lua", { on_line = 5, text = "3,", indent = 4 })
+ run:new_line("func.lua", { on_line = 9, text = "x = x + 1", indent = 0 })
run:new_line("string.lua", { on_line = 1, text = "x", indent = 0 })
run:new_line("string.lua", { on_line = 2, text = "x", indent = 0 })
run:new_line("string.lua", { on_line = 3, text = "x", indent = 2 })
@@ -34,5 +36,7 @@ describe("indent Lua:", function()
run:new_line("cond.lua", { on_line = 5, text = "x = x + 1", indent = 2 })
run:new_line("cond.lua", { on_line = 7, text = "x = x + 1", indent = 2 })
run:new_line("cond.lua", { on_line = 8, text = "x = x + 1", indent = 4 })
+ run:new_line("cond.lua", { on_line = 10, text = "x = x + 1", indent = 2 })
+ run:new_line("cond.lua", { on_line = 12, text = "x = x + 1", indent = 0 })
end)
end)