From: Bjørn Erik Pedersen Date: Thu, 3 Dec 2020 15:42:24 +0000 (+0100) Subject: Expand template newline testcase to commands X-Git-Tag: v0.81.0~17 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=21e9eb18acc2a2f8d8b97f096615b836e65091a2;p=brevno-suite%2Fhugo Expand template newline testcase to commands --- diff --git a/hugolib/template_test.go b/hugolib/template_test.go index 265cea1c..f487cec6 100644 --- a/hugolib/template_test.go +++ b/hugolib/template_test.go @@ -585,7 +585,7 @@ func TestTemplateGoIssues(t *testing.T) { {{ $title := "a & b" }} -{{/* 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", ` -Population in Norway is 5 millions +Population in Norway is 5 MILLIONS `) }