diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-14 11:58:45 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-14 19:09:20 +0200 |
commit | 74daca6b3050d96cd3a08b13f45de24edb450163 (patch) | |
tree | d740f7e7174c4685dae8cb262a790300b005be76 /resources/transform_test.go | |
parent | 1fd4c562afd467f246c632e9f3fed0a1f350d8dc (diff) | |
download | hugo-74daca6b3050d96cd3a08b13f45de24edb450163.tar.gz hugo-74daca6b3050d96cd3a08b13f45de24edb450163.zip |
Support PostProcess for all file types
Not just HTML.
Fixes #10269
Diffstat (limited to 'resources/transform_test.go')
-rw-r--r-- | resources/transform_test.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/resources/transform_test.go b/resources/transform_test.go index af8ccbc1f..1bd8302d2 100644 --- a/resources/transform_test.go +++ b/resources/transform_test.go @@ -71,8 +71,12 @@ func TestTransform(t *testing.T) { // Verify that we publish the same file once only. assertNoDuplicateWrites := func(c *qt.C, spec *Spec) { c.Helper() - d := spec.Fs.PublishDir.(hugofs.DuplicatesReporter) - c.Assert(d.ReportDuplicates(), qt.Equals, "") + hugofs.WalkFilesystems(spec.Fs.PublishDir, func(fs afero.Fs) bool { + if dfs, ok := fs.(hugofs.DuplicatesReporter); ok { + c.Assert(dfs.ReportDuplicates(), qt.Equals, "") + } + return false + }) } assertShouldExist := func(c *qt.C, spec *Spec, filename string, should bool) { |