mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
fix(tests): add heif exception in libvips < 8.8
This commit is contained in:
parent
69f1ab7767
commit
5bd2c1522e
3 changed files with 15 additions and 5 deletions
10
type_test.go
10
type_test.go
|
|
@ -53,6 +53,10 @@ func TestDeterminateImageTypeName(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, file := range files {
|
||||
if file.expected == "heif" && VipsMajorVersion <= 8 && VipsMinorVersion < 8 {
|
||||
continue
|
||||
}
|
||||
|
||||
img, _ := os.Open(path.Join("testdata", file.name))
|
||||
buf, _ := ioutil.ReadAll(img)
|
||||
defer img.Close()
|
||||
|
|
@ -72,6 +76,9 @@ func TestIsTypeSupported(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, n := range types {
|
||||
if n.name == HEIF && VipsMajorVersion <= 8 && VipsMinorVersion < 8 {
|
||||
continue
|
||||
}
|
||||
if IsTypeSupported(n.name) == false {
|
||||
t.Fatalf("Image type %s is not valid", ImageTypes[n.name])
|
||||
}
|
||||
|
|
@ -92,6 +99,9 @@ func TestIsTypeNameSupported(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, n := range types {
|
||||
if n.name == "heif" && VipsMajorVersion <= 8 && VipsMinorVersion < 8 {
|
||||
continue
|
||||
}
|
||||
if IsTypeNameSupported(n.name) != n.expected {
|
||||
t.Fatalf("Image type %s is not valid", n.name)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue