diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-12 15:14:27 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-06-12 16:29:19 +0200 |
commit | 2e1c81770a0e15940f72095e081f19e6f9d11b4e (patch) | |
tree | 28004361ff335282e79cc790fee81ed1ba84eb7c /resources | |
parent | 4276075c786aa744bc03b6e5b45bf739604b1e02 (diff) |
resources: Add a Gif source file to golden tests
Diffstat (limited to 'resources')
-rw-r--r-- | resources/image_test.go | 10 | ||||
-rw-r--r-- | resources/testdata/gohugoio-card.gif | bin | 0 -> 10820 bytes | |||
-rw-r--r-- | resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_100x0_resize_box.gif | bin | 0 -> 3555 bytes | |||
-rw-r--r-- | resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_220x0_resize_box.gif | bin | 0 -> 12249 bytes |
4 files changed, 10 insertions, 0 deletions
diff --git a/resources/image_test.go b/resources/image_test.go index 0bfef1db0..8f7c95e15 100644 --- 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 differnew file mode 100644 index 000000000..6bc20d83a --- /dev/null +++ b/resources/testdata/gohugoio-card.gif 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 differnew file mode 100644 index 000000000..7d810c1f9 --- /dev/null +++ b/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_100x0_resize_box.gif 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 differnew file mode 100644 index 000000000..c4b39b041 --- /dev/null +++ b/resources/testdata/golden/gohugoio-card_hu4d09f75255d3942fd4680641110a1a73_10820_220x0_resize_box.gif |