package notes import ( "net/http/httptest" "testing" ) func TestLsDir(t *testing.T) { p := Path{Local: "/usr/local"} dirs, files := lsDir(p) if len(dirs) == 0 { t.Fatal(len(dirs)) } if len(files) == 0 { t.Fatal(len(files)) } t.Log(dirs) t.Log(files) } func TestNotesDir(t *testing.T) { path := Path{Local: "/usr/local"} w := httptest.NewRecorder() notesDir(path, w, nil) t.Logf("%s", w.Body.Bytes()) }