hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 39a452a4c7bc4705af455d1dd2a77c6cd56bf96d
parent 593a546fc6b00d4a34eba3b3f5172fed2c100507
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Thu, 21 Jul 2016 21:03:44 +0200

Add "missing slice" to the Params test

See #2249

Diffstat:
Mhugolib/shortcode_test.go | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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) {