From: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> Date: Thu, 21 Jul 2016 19:03:44 +0000 (+0200) Subject: Add "missing slice" to the Params test X-Git-Tag: v0.17~224 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=39a452a4;p=brevno-suite%2Fhugo Add "missing slice" to the Params test See #2249 --- diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index cd2d9f7a..9e12045c 100644 --- a/hugolib/shortcode_test.go +++ b/hugolib/shortcode_test.go @@ -149,9 +149,11 @@ func TestNestedNamedMissingParam(t *testing.T) { tem := tpl.New() tem.AddInternalShortcode("acc.html", `<div class="acc">{{ .Inner }}</div>`) tem.AddInternalShortcode("div.html", `<div {{with .Get "class"}} class="{{ . }}"{{ end }}>{{ .Inner }}</div>`) + tem.AddInternalShortcode("div2.html", `<div {{with .Get 0}} class="{{ . }}"{{ end }}>{{ .Inner }}</div>`) + CheckShortCodeMatch(t, - `{{% acc %}}{{% div %}}{{% /div %}}{{% /acc %}}`, - "<div class=\"acc\"><div ></div>\n</div>", tem) + `{{% acc %}}{{% div %}}d1{{% /div %}}{{% div2 %}}d2{{% /div2 %}}{{% /acc %}}`, + "<div class=\"acc1\"><div></div>\n</div>", tem) } func TestIsNamedParamsSC(t *testing.T) {