MCPcopy
hub / github.com/cortesi/devd / TestEmptyDirOpenCWD

Function TestEmptyDirOpenCWD

fileserver/fileserver_test.go:316–328  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

314}
315
316func TestEmptyDirOpenCWD(t *testing.T) {
317 test := func(d http.Dir) {
318 name := "fileserver_test.go"
319 f, err := d.Open(name)
320 if err != nil {
321 t.Fatalf("open of %s: %v", name, err)
322 }
323 defer func() { _ = f.Close() }()
324 }
325 test(http.Dir(""))
326 test(http.Dir("."))
327 test(http.Dir("./"))
328}
329
330func TestServeFileContentType(t *testing.T) {
331 defer afterTest(t)

Callers

nothing calls this directly

Calls 2

OpenMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected