notes-server/server/path_test.go

24 lines
315 B
Go

package server
import "testing"
func TestPathIs(t *testing.T) {
p := Path{Local: "/dev/null"}
if ok := p.IsDir(); ok {
t.Fatal(ok, p)
}
if ok := p.IsFile(); !ok {
t.Fatal(ok, p)
}
p = Path{Local: "/tmp"}
if ok := p.IsDir(); !ok {
t.Fatal(ok, p)
}
if ok := p.IsFile(); ok {
t.Fatal(ok, p)
}
}