mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -04:00
Added test case for broken trees, plus partial test coverage
This commit is contained in:
parent
d71da4f63e
commit
9f78c9f0ad
2 changed files with 8 additions and 0 deletions
6
tests/indent/java/issue_2583.java
Normal file
6
tests/indent/java/issue_2583.java
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
// https://github.com/nvim-treesitter/nvim-treesitter/issues/2583
|
||||||
|
public class Testo {
|
||||||
|
void foo() {
|
||||||
|
new StringBuilder().append("a",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -23,5 +23,7 @@ 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 = 2 })
|
run:new_line("javadoc.java", { on_line = 2, text = "* Sample javadoc line", indent = 2 })
|
||||||
|
--TODO: Fix indentation when adding line *before* the ERROR line.
|
||||||
|
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