tests: add test for #2086

While this does not test the described problem in insert mode
This commit is contained in:
Stephan Seitz 2022-02-05 19:33:13 +01:00
parent a0b7cece2c
commit 9940e48675
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1,3 @@
{
statement;
statement;

View file

@ -37,6 +37,7 @@ describe("indent C:", function()
runner:new_line("switch.c", { on_line = 3, text = "x++;", indent = 12 })
runner:new_line("ternary.c", { on_line = 4, text = ": (x == 0) : 0", indent = 8 })
runner:new_line("issue-1568.c", { on_line = 4, text = "x++;", indent = 8 })
runner:new_line("issue-2086.c", { on_line = 3, text = "}", indent = 0 })
-- the line after inserted one will be left with wrong indent but we only care about the inserted one
runner:new_line("no_braces.c", { on_line = 4, text = "x++;", indent = 8 })
runner:new_line("no_braces.c", { on_line = 7, text = "x++;", indent = 8 })