(t *testing.T)
| 376 | } |
| 377 | |
| 378 | func Test_SetConfig_ValidateTemplateFiles(t *testing.T) { |
| 379 | cfg := userconfig.Config{ |
| 380 | TemplateFiles: map[string]string{ |
| 381 | "mytemplate.tmpl": ` |
| 382 | {{ define "mytemplate" }} |
| 383 | ToUpper{{ .Value | toUpper }} |
| 384 | ToLower{{ .Value | toLower }} |
| 385 | Title{{ .Value | title }} |
| 386 | Join{{ .Values | join " " }} |
| 387 | Match{{ .Value | match "fir" }} |
| 388 | SafeHTML{{ .Value | safeHtml }} |
| 389 | ReReplaceAll{{ .Value | reReplaceAll "-" "_" }} |
| 390 | StringSlice{{ .Value | stringSlice }} |
| 391 | {{ end }} |
| 392 | `, |
| 393 | }, |
| 394 | } |
| 395 | |
| 396 | err := validateTemplateFiles(cfg) |
| 397 | assert.Equal(t, nil, err) |
| 398 | } |
nothing calls this directly
no test coverage detected