filebrowser/src/backend/rules/rules_test.go
graham 619385dd05 Seperated code frontend/backend
- also temporarily un-embeded filesystem for debugging
2023-06-13 08:15:11 -05:00

24 lines
502 B
Go

package rules
import "testing"
func TestMatchHidden(t *testing.T) {
cases := map[string]bool{
"/": false,
"/src": false,
"/src/": false,
"/.circleci": true,
"/a/b/c/.docker.json": true,
".docker.json": true,
"Dockerfile": false,
"/Dockerfile": false,
}
for path, want := range cases {
got := MatchHidden(path)
if got != want {
t.Errorf("MatchHidden(%s)=%v; want %v", path, got, want)
}
}
}