diff options
| author | Daniel Woznicki <danwoz@nettoolkit.com> | 2022-03-01 11:37:23 -0800 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-03-01 21:12:14 +0100 |
| commit | 82389e52b6b50f712593079255ee088f1631b9cd (patch) | |
| tree | dd9c2f1c60ed83ef82ab725e2287e4fd93655ef6 /tests/indent/java_spec.lua | |
| parent | Made block comment indent @auto so that new lines line up nicely with existin... (diff) | |
| download | nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar.gz nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar.bz2 nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar.lz nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar.xz nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.tar.zst nvim-treesitter-82389e52b6b50f712593079255ee088f1631b9cd.zip | |
Added test for known indent failure when tree is in broken state
Diffstat (limited to 'tests/indent/java_spec.lua')
| -rw-r--r-- | tests/indent/java_spec.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/indent/java_spec.lua b/tests/indent/java_spec.lua index 49d2593fb..163020ffa 100644 --- a/tests/indent/java_spec.lua +++ b/tests/indent/java_spec.lua @@ -1,5 +1,5 @@ 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", { 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("interface.java", { on_line = 1, text = "void foo();", indent = 2 }) 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 }) end) end) |
