mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
Added test for known indent failure when tree is in broken state
This commit is contained in:
parent
3d6f2637a2
commit
82389e52b6
1 changed files with 7 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
local Runner = require("tests.indent.common").Runner
|
local Runner = require("tests.indent.common").Runner
|
||||||
--local XFAIL = require("tests.indent.common").XFAIL
|
local XFAIL = require("tests.indent.common").XFAIL
|
||||||
|
|
||||||
local run = Runner:new(it, "tests/indent/java", {
|
local run = Runner:new(it, "tests/indent/java", {
|
||||||
tabstop = 2,
|
tabstop = 2,
|
||||||
|
|
@ -23,7 +23,12 @@ describe("indent Java:", function()
|
||||||
run:new_line("enum_with_annotation.java", { on_line = 2, text = "THING;", indent = 2 })
|
run:new_line("enum_with_annotation.java", { on_line = 2, text = "THING;", indent = 2 })
|
||||||
run:new_line("interface.java", { on_line = 1, text = "void foo();", indent = 2 })
|
run:new_line("interface.java", { on_line = 1, text = "void foo();", indent = 2 })
|
||||||
run:new_line("javadoc.java", { on_line = 2, text = "* Sample javadoc line", indent = 3 })
|
run:new_line("javadoc.java", { on_line = 2, text = "* Sample javadoc line", indent = 3 })
|
||||||
--TODO: Fix indentation when adding line *before* the ERROR line.
|
run:new_line(
|
||||||
|
"issue_2583.java",
|
||||||
|
{ on_line = 3, text = "int x = 1;", indent = 4 },
|
||||||
|
"fails because tree is in a broken state",
|
||||||
|
XFAIL
|
||||||
|
)
|
||||||
run:new_line("issue_2583.java", { on_line = 4, text = "int x = 1;", indent = 4 })
|
run:new_line("issue_2583.java", { on_line = 4, text = "int x = 1;", indent = 4 })
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue