17 lines
416 B
Go
17 lines
416 B
Go
package media
|
|
|
|
import "testing"
|
|
|
|
func TestIsReservedName(t *testing.T) {
|
|
for _, n := range []string{"cache", "Cache", "CACHE", ".uploads", ".Uploads", ".trash"} {
|
|
if !IsReservedName(n) {
|
|
t.Errorf("IsReservedName(%q) = false, want true", n)
|
|
}
|
|
}
|
|
for _, n := range []string{"comics", "books", "my-library", "Cache1"} {
|
|
if IsReservedName(n) {
|
|
t.Errorf("IsReservedName(%q) = true, want false", n)
|
|
}
|
|
}
|
|
}
|