diff options
| author | John Isom <John.Isom2001@gmail.com> | 2020-07-27 12:18:40 -0600 |
|---|---|---|
| committer | John Isom <John.Isom2001@gmail.com> | 2020-07-27 12:18:40 -0600 |
| commit | 504d3098940a5b3bc3ed407c2d0c3c3f4944ecdf (patch) | |
| tree | cb9eac65aeff02db7149ec13272426805774a91f /test | |
| parent | de214d262c2dff13974e4905fbb6a2dc89526736 (diff) | |
Add go test cases for bad indentation edge case
Diffstat (limited to 'test')
4 files changed, 21 insertions, 0 deletions
diff --git a/test/indent/go/deindent-function-closing-brace/in b/test/indent/go/deindent-function-closing-brace/in index 6c56be4e..a30bf4c4 100644 --- a/test/indent/go/deindent-function-closing-brace/in +++ b/test/indent/go/deindent-function-closing-brace/in @@ -10,3 +10,6 @@ func foo(x int) int {%( )bar() func foo(x int) int { bar()%( )} + + func foo(x int) int { + bar()%( )} diff --git a/test/indent/go/deindent-function-closing-brace/out b/test/indent/go/deindent-function-closing-brace/out index a5a15ced..3a5e4869 100644 --- a/test/indent/go/deindent-function-closing-brace/out +++ b/test/indent/go/deindent-function-closing-brace/out @@ -15,3 +15,7 @@ func foo(x int) int { func foo(x int) int { bar() } + + func foo(x int) int { + bar() + } diff --git a/test/indent/go/deindent-generic-closing-brace/in b/test/indent/go/deindent-generic-closing-brace/in index b2f7c26d..5a31c18f 100644 --- a/test/indent/go/deindent-generic-closing-brace/in +++ b/test/indent/go/deindent-generic-closing-brace/in @@ -11,6 +11,9 @@ { bar()%( )} + { + bar()%( )} + {(%( ))} {(%( ) @@ -23,3 +26,6 @@ {( bar()%( ))} + + {( + bar()%( ))} diff --git a/test/indent/go/deindent-generic-closing-brace/out b/test/indent/go/deindent-generic-closing-brace/out index 58109817..cfd6db40 100644 --- a/test/indent/go/deindent-generic-closing-brace/out +++ b/test/indent/go/deindent-generic-closing-brace/out @@ -16,6 +16,10 @@ bar() } + { + bar() + } + {( )} @@ -33,3 +37,7 @@ {( bar() )} + + {( + bar() + )} |
