Add test cases for rust closing brace indentation
This commit is contained in:
parent
46ea52a0a8
commit
d2437b468d
1
test/indent/rust/deindent-function-closing-brace/cmd
Normal file
1
test/indent/rust/deindent-function-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
12
test/indent/rust/deindent-function-closing-brace/in
Normal file
12
test/indent/rust/deindent-function-closing-brace/in
Normal file
|
@ -0,0 +1,12 @@
|
|||
fn foo() -> i32 {%( )}
|
||||
|
||||
fn foo() -> i32 {%( )
|
||||
}
|
||||
|
||||
fn foo() -> i32 {%( )bar()}
|
||||
|
||||
fn foo() -> i32 {%( )bar()
|
||||
}
|
||||
|
||||
fn foo() -> i32 {
|
||||
bar()%( )}
|
17
test/indent/rust/deindent-function-closing-brace/out
Normal file
17
test/indent/rust/deindent-function-closing-brace/out
Normal file
|
@ -0,0 +1,17 @@
|
|||
fn foo() -> i32 {
|
||||
}
|
||||
|
||||
fn foo() -> i32 {
|
||||
|
||||
}
|
||||
|
||||
fn foo() -> i32 {
|
||||
bar()}
|
||||
|
||||
fn foo() -> i32 {
|
||||
bar()
|
||||
}
|
||||
|
||||
fn foo() -> i32 {
|
||||
bar()
|
||||
}
|
3
test/indent/rust/deindent-function-closing-brace/rc
Normal file
3
test/indent/rust/deindent-function-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/rust.kak"
|
||||
set buffer filetype rust
|
1
test/indent/rust/deindent-generic-closing-brace/cmd
Normal file
1
test/indent/rust/deindent-generic-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
25
test/indent/rust/deindent-generic-closing-brace/in
Normal file
25
test/indent/rust/deindent-generic-closing-brace/in
Normal file
|
@ -0,0 +1,25 @@
|
|||
{%( )}
|
||||
|
||||
{%( )
|
||||
}
|
||||
|
||||
{%( )bar()}
|
||||
|
||||
{%( )bar()
|
||||
}
|
||||
|
||||
{
|
||||
bar()%( )}
|
||||
|
||||
{(%( ))}
|
||||
|
||||
{(%( )
|
||||
)}
|
||||
|
||||
{(%( )foo())}
|
||||
|
||||
{(%( )foo()
|
||||
)}
|
||||
|
||||
{(
|
||||
bar()%( ))}
|
35
test/indent/rust/deindent-generic-closing-brace/out
Normal file
35
test/indent/rust/deindent-generic-closing-brace/out
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
bar()}
|
||||
|
||||
{
|
||||
bar()
|
||||
}
|
||||
|
||||
{
|
||||
bar()
|
||||
}
|
||||
|
||||
{(
|
||||
)}
|
||||
|
||||
{(
|
||||
|
||||
)}
|
||||
|
||||
{(
|
||||
foo())}
|
||||
|
||||
{(
|
||||
foo()
|
||||
)}
|
||||
|
||||
{(
|
||||
bar()
|
||||
)}
|
3
test/indent/rust/deindent-generic-closing-brace/rc
Normal file
3
test/indent/rust/deindent-generic-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/rust.kak"
|
||||
set buffer filetype rust
|
1
test/indent/rust/deindent-if-closing-brace/cmd
Normal file
1
test/indent/rust/deindent-if-closing-brace/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
c<ret>
|
12
test/indent/rust/deindent-if-closing-brace/in
Normal file
12
test/indent/rust/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/rust/deindent-if-closing-brace/out
Normal file
17
test/indent/rust/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/rust/deindent-if-closing-brace/rc
Normal file
3
test/indent/rust/deindent-if-closing-brace/rc
Normal file
|
@ -0,0 +1,3 @@
|
|||
source "%val{runtime}/colors/default.kak"
|
||||
source "%val{runtime}/rc/filetype/rust.kak"
|
||||
set buffer filetype rust
|
Loading…
Reference in New Issue
Block a user