@@ -299,6 +299,21 @@ func TestFormatComplexWithArgFormatting(t *testing.T) {
299299 args : map [string ]any {"float" : 10.5467890 },
300300 expected : "This is the text with an only number formatting: decimal - 10.546789 / 10.5468 / 10.54678900" ,
301301 },
302+ "list_with_default_sep" : {
303+ template : "This is a list(slice) test: {list:L}" ,
304+ args : map [string ]any {"list" : []any {"s1" , "s2" , "s3" }},
305+ expected : "This is a list(slice) test: s1,s2,s3" ,
306+ },
307+ "list_with_dash_sep" : {
308+ template : "This is a list(slice) test: {list:L-}" ,
309+ args : map [string ]any {"list" : []any {"s1" , "s2" , "s3" }},
310+ expected : "This is a list(slice) test: s1-s2-s3" ,
311+ },
312+ "list_with_space_sep" : {
313+ template : "This is a list(slice) test: {list:L }" ,
314+ args : map [string ]any {"list" : []any {"s1" , "s2" , "s3" }},
315+ expected : "This is a list(slice) test: s1 s2 s3" ,
316+ },
302317 } {
303318 t .Run (name , func (t * testing.T ) {
304319 assert .Equal (t , test .expected , stringFormatter .FormatComplex (test .template , test .args ))
0 commit comments