Skip to content

Commit 53498c9

Browse files
committed
a test was added
1 parent a679eb2 commit 53498c9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

formatter_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,16 @@ func TestFormat(t *testing.T) {
113113
},
114114
expected: "Example is: {123 This is a test str, nothing more special -1.098743 main question error, is 42}",
115115
},
116-
"open bracket at the end of line of go file": {
116+
"open bracket at the end of line of go line": {
117117
template: "type serviceHealth struct {",
118118
args: []any{},
119119
expected: "type serviceHealth struct {",
120120
},
121+
"open bracket at the end of line of go line with {} inside": {
122+
template: "func afterHandle(respWriter *http.ResponseWriter, statusCode int, data interface{}) {",
123+
args: []any{},
124+
expected: "func afterHandle(respWriter *http.ResponseWriter, statusCode int, data interface{}) {",
125+
},
121126
} {
122127
t.Run(name, func(t *testing.T) {
123128
assert.Equal(t, test.expected, stringFormatter.Format(test.template, test.args...))

0 commit comments

Comments
 (0)