resources: Add a Gif source file to golden tests

This commit is contained in:
Bjørn Erik Pedersen 2022-06-12 15:14:27 +02:00
parent 4276075c78
commit 2e1c81770a
4 changed files with 10 additions and 0 deletions

View file

@ -646,6 +646,16 @@ func TestImageOperationsGolden(t *testing.T) {
} }
} }
// A simple Gif file (no animation).
orig := fetchImageForSpec(spec, c, "gohugoio-card.gif")
for _, resizeSpec := range []string{"100x", "220x"} {
resized, err := orig.Resize(resizeSpec)
c.Assert(err, qt.IsNil)
rel := resized.RelPermalink()
c.Log("resize", rel)
c.Assert(rel, qt.Not(qt.Equals), "")
}
for _, img := range testImages { for _, img := range testImages {
orig := fetchImageForSpec(spec, c, img) orig := fetchImageForSpec(spec, c, img)

BIN
resources/testdata/gohugoio-card.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB