aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/lua_spec.lua
diff options
context:
space:
mode:
authorMunif Tanjim <hello@muniftanjim.dev>2022-01-18 21:17:26 +0600
committerChristian Clason <christian.clason@uni-due.de>2022-01-21 10:51:51 +0100
commitc0110e34aa8ef53480c7aac6ffa5b9f8227a96bd (patch)
treec31796e3cdc7165dbc49e05b9e0c2eb79dca9896 /tests/indent/lua_spec.lua
parentfeat: improve indent module (diff)
downloadnvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.gz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.bz2
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.lz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.xz
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.tar.zst
nvim-treesitter-c0110e34aa8ef53480c7aac6ffa5b9f8227a96bd.zip
feat: rewrite indent module
Diffstat (limited to 'tests/indent/lua_spec.lua')
-rw-r--r--tests/indent/lua_spec.lua16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/indent/lua_spec.lua b/tests/indent/lua_spec.lua
index cf615713c..d198c5cca 100644
--- a/tests/indent/lua_spec.lua
+++ b/tests/indent/lua_spec.lua
@@ -10,21 +10,23 @@ local run = Runner:new(it, "tests/indent/lua", {
describe("indent Lua:", function()
describe("whole file:", function()
- run:whole_file(".", { expected_failures = {
- "./comment.lua",
- } })
+ run:whole_file(".", {
+ expected_failures = {
+ "./comment.lua",
+ },
+ })
end)
describe("new line:", function()
run:new_line("comment.lua", { on_line = 1, text = "line", indent = "-- " })
- run:new_line("comment.lua", { on_line = 5, text = "multiline", indent = " " })
+ 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 = 5, text = "3,", indent = 4 })
- run:new_line("string.lua", { on_line = 1, text = "x", indent = 0 }, "expected failure", XFAIL)
- run:new_line("string.lua", { on_line = 2, text = "x", indent = 0 }, "expected failure", XFAIL)
+ 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 })
- run:new_line("string.lua", { on_line = 4, text = "x", indent = 4 }, "expected failure", XFAIL)
+ run:new_line("string.lua", { on_line = 4, text = "x", indent = 4 })
run:new_line("table.lua", { on_line = 1, text = "b = 0,", indent = 2 })
run:new_line("table.lua", { on_line = 5, text = "4,", indent = 4 })
run:new_line("table.lua", { on_line = 7, text = "4,", indent = 4 })