summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-07-21 21:03:44 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2016-07-21 21:03:44 +0200
commit39a452a4c7bc4705af455d1dd2a77c6cd56bf96d (patch)
treeca9038129f0fd19712ef00a3d6e8fb8c9cb14ca1 /hugolib/shortcode_test.go
parent593a546fc6b00d4a34eba3b3f5172fed2c100507 (diff)
Add "missing slice" to the Params test
See #2249
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index cd2d9f7a5..9e12045c3 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) {