Add test cases for go closing brace indentation
This commit is contained in:
parent
902f2831d8
commit
0439128007
1
test/indent/go/deindent-function-closing-brace/cmd
Normal file
1
test/indent/go/deindent-function-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
12
test/indent/go/deindent-function-closing-brace/in
Normal file
12
test/indent/go/deindent-function-closing-brace/in
Normal file
|
@ -0,0 +1,12 @@
|
|||
func foo(x int) int {%( )}
|
||||
|
||||
func foo(x int) int {%( )
|
||||
}
|
||||
|
||||
func foo(x int) int {%( )bar()}
|
||||
|
||||
func foo(x int) int {%( )bar()
|
||||
}
|
||||
|
||||
func foo(x int) int {
|
||||
bar()%( )}
|
17
test/indent/go/deindent-function-closing-brace/out
Normal file
17
test/indent/go/deindent-function-closing-brace/out
Normal file
|
@ -0,0 +1,17 @@
|
|||
func foo(x int) int {
|
||||
}
|
||||
|
||||
func foo(x int) int {
|
||||
|
||||
}
|
||||
|
||||
func foo(x int) int {
|
||||
bar()}
|
||||
|
||||
func foo(x int) int {
|
||||
bar()
|
||||
}
|
||||
|
||||
func foo(x int) int {
|
||||
bar()
|
||||
}
|
3
test/indent/go/deindent-function-closing-brace/rc
Normal file
3
test/indent/go/deindent-function-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/go.kak"
|
||||
set buffer filetype go
|
1
test/indent/go/deindent-generic-closing-brace/cmd
Normal file
1
test/indent/go/deindent-generic-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
25
test/indent/go/deindent-generic-closing-brace/in
Normal file
25
test/indent/go/deindent-generic-closing-brace/in
Normal file
|
@ -0,0 +1,25 @@
|
|||
{%( )}
|
||||
|
||||
{%( )
|
||||
}
|
||||
|
||||
{%( )bar()}
|
||||
|
||||
{%( )bar()
|
||||
}
|
||||
|
||||
{
|
||||
bar()%( )}
|
||||
|
||||
{(%( ))}
|
||||
|
||||
{(%( )
|
||||
)}
|
||||
|
||||
{(%( )foo())}
|
||||
|
||||
{(%( )foo()
|
||||
)}
|
||||
|
||||
{(
|
||||
bar()%( ))}
|
35
test/indent/go/deindent-generic-closing-brace/out
Normal file
35
test/indent/go/deindent-generic-closing-brace/out
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
bar()}
|
||||
|
||||
{
|
||||
bar()
|
||||
}
|
||||
|
||||
{
|
||||
bar()
|
||||
}
|
||||
|
||||
{(
|
||||
)}
|
||||
|
||||
{(
|
||||
|
||||
)}
|
||||
|
||||
{(
|
||||
foo())}
|
||||
|
||||
{(
|
||||
foo()
|
||||
)}
|
||||
|
||||
{(
|
||||
bar()
|
||||
)}
|
3
test/indent/go/deindent-generic-closing-brace/rc
Normal file
3
test/indent/go/deindent-generic-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/go.kak"
|
||||
set buffer filetype go
|
1
test/indent/go/deindent-if-closing-brace/cmd
Normal file
1
test/indent/go/deindent-if-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
12
test/indent/go/deindent-if-closing-brace/in
Normal file
12
test/indent/go/deindent-if-closing-brace/in
Normal file
|
@ -0,0 +1,12 @@
|
|||
if true {%( )}
|
||||
|
||||
if true {%( )
|
||||
}
|
||||
|
||||
if true {%( )bar()}
|
||||
|
||||
if true {%( )bar()
|
||||
}
|
||||
|
||||
if true {
|
||||
bar()%( )}
|
17
test/indent/go/deindent-if-closing-brace/out
Normal file
17
test/indent/go/deindent-if-closing-brace/out
Normal file
|
@ -0,0 +1,17 @@
|
|||
if true {
|
||||
}
|
||||
|
||||
if true {
|
||||
|
||||
}
|
||||
|
||||
if true {
|
||||
bar()}
|
||||
|
||||
if true {
|
||||
bar()
|
||||
}
|
||||
|
||||
if true {
|
||||
bar()
|
||||
}
|
3
test/indent/go/deindent-if-closing-brace/rc
Normal file
3
test/indent/go/deindent-if-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/go.kak"
|
||||
set buffer filetype go
|
Loading…
Reference in New Issue
Block a user