diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-08-09 17:54:14 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-08-10 14:00:21 +0200 |
commit | fbfccb394b8ead6435375f9dc6ae07e9df60e860 (patch) | |
tree | def808bbc3c9f9914014a41e7961749d312eb231 /resources | |
parent | ef2e30eca3799e3835b1ec4c20f6f30b7237715f (diff) | |
download | hugo-fbfccb394b8ead6435375f9dc6ae07e9df60e860.tar.gz hugo-fbfccb394b8ead6435375f9dc6ae07e9df60e860.zip |
Fix compare of uints and ints in eq, gt etc.
Fixes #12733
Diffstat (limited to 'resources')
-rw-r--r-- | resources/images/images_integration_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/resources/images/images_integration_test.go b/resources/images/images_integration_test.go index 156de6259..caba42e03 100644 --- a/resources/images/images_integration_test.go +++ b/resources/images/images_integration_test.go @@ -34,3 +34,19 @@ W/H rotated: {{ $rotated.Width }}/{{ $rotated.Height }} b := hugolib.Test(t, files) b.AssertFileContent("public/index.html", "W/H original: 80/40\n\nW/H rotated: 40/80") } + +// Issue 12733. +func TestOrientationEq(t *testing.T) { + files := ` +-- hugo.toml -- +-- assets/rotate270.jpg -- +sourcefilename: ../testdata/exif/orientation6.jpg +-- layouts/index.html -- +{{ $img := resources.Get "rotate270.jpg" }} +{{ $orientation := $img.Exif.Tags.Orientation }} +Orientation: {{ $orientation }}|eq 6: {{ eq $orientation 6 }}|Type: {{ printf "%T" $orientation }}| +` + + b := hugolib.Test(t, files) + b.AssertFileContent("public/index.html", "Orientation: 6|eq 6: true|") +} |