diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2020-12-03 16:42:24 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-02-18 14:11:48 +0100 |
commit | 21e9eb18acc2a2f8d8b97f096615b836e65091a2 (patch) | |
tree | 6644af9d19971c8ab853ed05fee5800014fd1a19 /hugolib | |
parent | ae57ba6a9dee87347fa2d5e8c6865f390989622e (diff) |
Expand template newline testcase to commands
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/template_test.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hugolib/template_test.go b/hugolib/template_test.go index 265cea1cb..f487cec67 100644 --- a/hugolib/template_test.go +++ b/hugolib/template_test.go @@ -585,7 +585,7 @@ func TestTemplateGoIssues(t *testing.T) { {{ $title := "a & b" }} <script type="application/ld+json">{"@type":"WebPage","headline":"{{$title}}"}</script> -{{/* Action newlines, from Go 1.16, see https://github.com/golang/go/issues/29770 */}} +{{/* Action/commands newlines, from Go 1.16, see https://github.com/golang/go/issues/29770 */}} {{ $norway := dict "country" "Norway" "population" "5 millions" @@ -598,7 +598,11 @@ func TestTemplateGoIssues(t *testing.T) { "dialing_code" "+47" }} -Population in Norway is {{ $norway.population }} +Population in Norway is {{ + $norway.population + | lower + | upper +}} `, ) @@ -607,7 +611,7 @@ Population in Norway is {{ $norway.population }} b.AssertFileContent("public/index.html", ` <script type="application/ld+json">{"@type":"WebPage","headline":"a \u0026 b"}</script> -Population in Norway is 5 millions +Population in Norway is 5 MILLIONS `) } |