diff options
| author | Pham Huy Hoang <hoangtun0810@gmail.com> | 2023-03-20 15:58:06 +0900 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2023-04-08 09:59:21 -0700 |
| commit | 9161093fc7e13b12aa5bc86c641768c049d43a26 (patch) | |
| tree | 2ef3c3bb5f5b3c4ef821fbebc6cba46e4352fef6 /tests/indent/c_spec.lua | |
| parent | add test (diff) | |
| download | nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar.gz nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar.bz2 nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar.lz nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar.xz nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.tar.zst nvim-treesitter-9161093fc7e13b12aa5bc86c641768c049d43a26.zip | |
fix(c_indents): fix expression leaking indents
Diffstat (limited to 'tests/indent/c_spec.lua')
| -rw-r--r-- | tests/indent/c_spec.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/indent/c_spec.lua b/tests/indent/c_spec.lua index 4fcdb3ebf..4e2826a54 100644 --- a/tests/indent/c_spec.lua +++ b/tests/indent/c_spec.lua @@ -73,5 +73,21 @@ describe("indent C:", function() for _, line in ipairs { 10, 12, 14 } do runner:new_line("if_else.c", { on_line = line, text = "{}", indent = 4 }) end + + for _, info in ipairs { + { 8, 0 }, + { 10, 0 }, + { 13, 4 }, + { 14, 4 }, + { 15, 4 }, + { 16, 4 }, + { 17, 4 }, + { 18, 4 }, + { 20, 8 }, + { 21, 8 }, + { 22, 4 }, + } do + runner:new_line("issue-4525.c", { on_line = info[1], text = "x++;", indent = info[2] }) + end end) end) |
