Files

21 lines
485 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package health
import "testing"
func TestExcluded(t *testing.T) {
list := []string{"assets/raw", "assets/keep.png"}
for rel, want := range map[string]bool{
"assets/raw/a.png": true,
"assets/rawx/a.png": false,
"assets/keep.png": true,
"assets/other.png": false,
} {
if excluded(rel, list) != want {
t.Fatalf("excluded(%q) != %v", rel, want)
}
}
if PathOf("assets/big.png 8192×8192") != "assets/big.png" {
t.Fatal("PathOf must strip the size suffix")
}
}