mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-22 05:10:04 -04:00
Add Clojure indent tests
This commit is contained in:
parent
660370a337
commit
e59381ab5f
2 changed files with 188 additions and 0 deletions
51
tests/indent/clojure_spec.lua
Normal file
51
tests/indent/clojure_spec.lua
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
local Runner = require("tests.indent.common").Runner
|
||||
local XFAIL = require("tests.indent.common").XFAIL
|
||||
|
||||
local run = Runner:new(it, "tests/indent/clojure", {
|
||||
tabstop = 2,
|
||||
shiftwidth = 2,
|
||||
softtabstop = 0,
|
||||
expandtab = true,
|
||||
})
|
||||
|
||||
describe("indent Clojure:", function()
|
||||
describe("whole file:", function()
|
||||
run:whole_file(".", {
|
||||
expected_failures = {},
|
||||
})
|
||||
end)
|
||||
|
||||
describe("new line:", function()
|
||||
run:new_line("test.cljc", { on_line = 1, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 4, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 11, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 16, text = ":x", indent = 6 })
|
||||
run:new_line("test.cljc", { on_line = 20, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 23, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 31, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 34, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 34, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 47, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 51, text = ":x", indent = 3 })
|
||||
run:new_line("test.cljc", { on_line = 55, text = ":x", indent = 9 })
|
||||
run:new_line("test.cljc", { on_line = 63, text = ":x", indent = 10 })
|
||||
run:new_line("test.cljc", { on_line = 68, text = ":x", indent = 3 })
|
||||
run:new_line("test.cljc", { on_line = 70, text = ":x", indent = 4 })
|
||||
run:new_line("test.cljc", { on_line = 74, text = ":x", indent = 3 })
|
||||
run:new_line("test.cljc", { on_line = 83, text = ":x", indent = 3 })
|
||||
run:new_line("test.cljc", { on_line = 86, text = ":x", indent = 4 })
|
||||
run:new_line("test.cljc", { on_line = 89, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 92, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 95, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 98, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 101, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 104, text = ":x", indent = 1 })
|
||||
run:new_line("test.cljc", { on_line = 107, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 110, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 113, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 116, text = ":x", indent = 3 })
|
||||
run:new_line("test.cljc", { on_line = 120, text = ":x", indent = 2 })
|
||||
run:new_line("test.cljc", { on_line = 132, text = ":x", indent = 8 })
|
||||
run:new_line("test.cljc", { on_line = 135, text = ":x", indent = 2 })
|
||||
end)
|
||||
end)
|
||||
Loading…
Add table
Add a link
Reference in a new issue