MCPcopy
hub / github.com/gin-gonic/gin / TestDebugPrintLoadTemplate

Function TestDebugPrintLoadTemplate

debug_test.go:89–97  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

87}
88
89func TestDebugPrintLoadTemplate(t *testing.T) {
90 re := captureOutput(t, func() {
91 SetMode(DebugMode)
92 templ := template.Must(template.New("").Delims("{[{", "}]}").ParseGlob("./testdata/template/hello.tmpl"))
93 debugPrintLoadTemplate(templ)
94 SetMode(TestMode)
95 })
96 assert.Regexp(t, `^\[GIN-debug\] Loaded HTML Templates \(2\): \n(\t- \n|\t- hello\.tmpl\n){2}\n`, re)
97}
98
99func TestDebugPrintWARNINGSetHTMLTemplate(t *testing.T) {
100 re := captureOutput(t, func() {

Callers

nothing calls this directly

Calls 4

captureOutputFunction · 0.85
SetModeFunction · 0.85
debugPrintLoadTemplateFunction · 0.85
DelimsMethod · 0.80

Tested by

no test coverage detected