mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
tests: Add test for C folding issue #1568
Also this issue has already been fixed
This commit is contained in:
parent
a42137f56a
commit
a62971e0ef
2 changed files with 7 additions and 0 deletions
6
tests/indent/c/issue-1568.c
Normal file
6
tests/indent/c/issue-1568.c
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
int main() {
|
||||
if (1) {
|
||||
foobar();
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
|
@ -36,6 +36,7 @@ describe("indent C:", function()
|
|||
runner:new_line("struct.c", { on_line = 4, text = "int y;", indent = 8 })
|
||||
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 })
|
||||
-- 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 })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue