mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
indents(c): fix ternary
This commit is contained in:
parent
cf8ca7ee4e
commit
3ff725e654
3 changed files with 2 additions and 5 deletions
|
|
@ -12,7 +12,6 @@ describe("indent C:", function()
|
|||
describe("whole file:", function()
|
||||
runner:whole_file(".", {
|
||||
expected_failures = {
|
||||
"./ternary.c",
|
||||
"./preproc_func.c",
|
||||
"./label.c",
|
||||
"./comment.c",
|
||||
|
|
@ -37,7 +36,7 @@ describe("indent C:", function()
|
|||
runner:new_line("string.c", { on_line = 4, text = '"brave new "', indent = 4 })
|
||||
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 }, "expected failure", XFAIL)
|
||||
runner:new_line("ternary.c", { on_line = 4, text = ": (x == 0) : 0", 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