diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-03-11 09:18:01 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-03-14 15:21:54 +0100 |
commit | ba1d0051b44fdd242b20899e195e37ab26501516 (patch) | |
tree | 646f815cf5eb027bae13e329696acf14d640d3f9 /hugolib/site_output_test.go | |
parent | 1b1dcf586e220c3a8ad5ecfa8e4c3dac97f0ab44 (diff) |
media: Make Type comparable
So we can use it and output.Format as map key etc.
This commit also fixes the media.Type implementation so it does not need to mutate itself to handle different suffixes for the same MIME type, e.g. jpg vs. jpeg.
This means that there are no Suffix or FullSuffix on media.Type anymore.
Fixes #8317
Fixes #8324
Diffstat (limited to 'hugolib/site_output_test.go')
-rw-r--r-- | hugolib/site_output_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hugolib/site_output_test.go b/hugolib/site_output_test.go index 5a329942c..1961dd06f 100644 --- a/hugolib/site_output_test.go +++ b/hugolib/site_output_test.go @@ -305,13 +305,14 @@ baseName = "customdelimbase" c.Assert(err, qt.IsNil) + s := h.Sites[0] + th.assertFileContent("public/_redirects", "a dotless") th.assertFileContent("public/defaultdelimbase.defd", "default delimim") // This looks weird, but the user has chosen this definition. th.assertFileContent("public/nosuffixbase", "no suffix") th.assertFileContent("public/customdelimbase_del", "custom delim") - s := h.Sites[0] home := s.getPage(page.KindHome) c.Assert(home, qt.Not(qt.IsNil)) |