commit 2e1c81770a0e15940f72095e081f19e6f9d11b4e parent 4276075c786aa744bc03b6e5b45bf739604b1e02 Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> Date: Sun, 12 Jun 2022 15:14:27 +0200 resources: Add a Gif source file to golden tests Diffstat:
4 files changed, 10 insertions(+), 0 deletions(-) diff --git a/resources/image_test.go b/resources/image_test.go @@ -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 { orig := fetchImageForSpec(spec, c, img) diff --git a/resources/testdata/gohugoio-card.gif b/resources/testdata/gohugoio-card.gif Binary files differ. diff --git a/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_100x0_resize_box.gif b/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_100x0_resize_box.gif Binary files differ. diff --git a/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_220x0_resize_box.gif b/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_220x0_resize_box.gif Binary files differ.