diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-27 10:00:43 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-10-27 11:34:15 +0200 |
commit | b27ccf34bf4e5ee618a66fa11c68a9690e395034 (patch) | |
tree | 29a5fbbad1f69fdedf8aced7cf0663b5e7467907 /hugolib | |
parent | 286d0b7dc3aa6e118eb7d5f19900377ae55ab41c (diff) |
resource: Allow .Data.Integrity to be accessed on its own
Fixes #5296
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/resource_chain_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go index 1f55976f0..3a1fb040a 100644 --- a/hugolib/resource_chain_test.go +++ b/hugolib/resource_chain_test.go @@ -288,11 +288,18 @@ T2: {{ $result.Content }}|{{ $result.RelPermalink}}|{{$result.MediaType.Type }} T1: {{ $result.Content }}|{{ $result.RelPermalink}}|{{$result.MediaType.Type }}|{{ $result.Data.Integrity }}| T2: {{ $result512.Content }}|{{ $result512.RelPermalink}}|{{$result512.MediaType.Type }}|{{ $result512.Data.Integrity }}| T3: {{ $resultMD5.Content }}|{{ $resultMD5.RelPermalink}}|{{$resultMD5.MediaType.Type }}|{{ $resultMD5.Data.Integrity }}| +{{ $r2 := "bc" | resources.FromString "rocks/hugo2.txt" | fingerprint }} +{{/* https://github.com/gohugoio/hugo/issues/5296 */}} +T4: {{ $r2.Data.Integrity }}| + + `) }, func(b *sitesBuilder) { b.AssertFileContent("public/index.html", `T1: ab|/rocks/hugo.fb8e20fc2e4c3f248c60c39bd652f3c1347298bb977b8b4d5903b85055620603.txt|text/plain|sha256-+44g/C5MPySMYMOb1lLzwTRymLuXe4tNWQO4UFViBgM=|`) b.AssertFileContent("public/index.html", `T2: ab|/rocks/hugo.2d408a0717ec188158278a796c689044361dc6fdde28d6f04973b80896e1823975cdbf12eb63f9e0591328ee235d80e9b5bf1aa6a44f4617ff3caf6400eb172d.txt|text/plain|sha512-LUCKBxfsGIFYJ4p5bGiQRDYdxv3eKNbwSXO4CJbhgjl1zb8S62P54FkTKO4jXYDptb8apqRPRhf/PK9kAOsXLQ==|`) b.AssertFileContent("public/index.html", `T3: ab|/rocks/hugo.187ef4436122d1cc2f40dc2b92f0eba0.txt|text/plain|md5-GH70Q2Ei0cwvQNwrkvDroA==|`) + b.AssertFileContent("public/index.html", `T4: sha256-Hgu9bGhroFC46wP/7txk/cnYCUf86CGrvl1tyNJSxaw=|`) + }}, {"template", func() bool { return true }, func(b *sitesBuilder) {}, func(b *sitesBuilder) { }}, |