Add "missing slice" to the Params test - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 39a452a4c7bc4705af455d1dd2a77c6cd56bf96d
DIR parent 593a546fc6b00d4a34eba3b3f5172fed2c100507
HTML 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:
M hugolib/shortcode_test.go | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
DIR 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) {