diff options
| author | Akin Sowemimo <akin.sowemimo@gmail.com> | 2022-04-18 12:19:31 +0100 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2022-04-18 14:11:02 +0200 |
| commit | bca65c068b92f19174dbba15d538315e8c89a5d6 (patch) | |
| tree | 350fa0087f522ead3d8799fecb8df7694a2ca015 | |
| parent | eb0eb67bc5e88a1dd606992f5dede9f1ad43ebe0 (diff) | |
test(go): add cases for newlines de-indentation
test(go): combine new indent test cases
test(go): add incorrect indent after var closing )
this case does not work correctly already so add that in since this PR
does not address that case
test(go): set current lines in indent test
test(go): simplify test case
| -rw-r--r-- | tests/indent/go/issue-2369-newline.go | 8 | ||||
| -rw-r--r-- | tests/indent/go_spec.lua | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/indent/go/issue-2369-newline.go b/tests/indent/go/issue-2369-newline.go new file mode 100644 index 00000000..42dd00b5 --- /dev/null +++ b/tests/indent/go/issue-2369-newline.go @@ -0,0 +1,8 @@ +// https://github.com/nvim-treesitter/nvim-treesitter/issues/2369 +package main + +import "fmt" + +func new_line() { + fmt.Println("Hello, World!") +} diff --git a/tests/indent/go_spec.lua b/tests/indent/go_spec.lua index 25c19337..10e9763c 100644 --- a/tests/indent/go_spec.lua +++ b/tests/indent/go_spec.lua @@ -18,4 +18,8 @@ describe("indent Go:", function() describe("new line:", function() run:new_line("issue-2369.go", { on_line = 13, text = "// some comment", indent = 1 }) end) + + describe("new line after )/}:", function() + run:new_line("issue-2369-newline.go", { on_line = 8, text = "// comment", indent = 0 }) + end) end) |
