(t *testing.T)
| 63 | } |
| 64 | |
| 65 | func TestLoadHTMLGlobDebugMode(t *testing.T) { |
| 66 | ts := setupHTMLFiles( |
| 67 | t, |
| 68 | DebugMode, |
| 69 | false, |
| 70 | func(router *Engine) { |
| 71 | router.LoadHTMLGlob("./testdata/template/*") |
| 72 | }, |
| 73 | ) |
| 74 | defer ts.Close() |
| 75 | |
| 76 | res, err := http.Get(ts.URL + "/test") |
| 77 | if err != nil { |
| 78 | t.Error(err) |
| 79 | } |
| 80 | |
| 81 | resp, _ := io.ReadAll(res.Body) |
| 82 | assert.Equal(t, "<h1>Hello world</h1>", string(resp)) |
| 83 | } |
| 84 | |
| 85 | func TestH2c(t *testing.T) { |
| 86 | ln, err := net.Listen("tcp", localhostIP+":0") |
nothing calls this directly
no test coverage detected