summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode_test.go
diff options
context:
space:
mode:
authorcmal <paul@cmal.info>2018-04-17 11:29:00 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-04-17 15:39:33 +0200
commite2b277bba5935c0686cb83f132eae021ef2dc5e1 (patch)
tree01246aeda1a6794a71bb46317af5bb51746de55d /hugolib/shortcode_test.go
parent236f0c840b45e0c41fcbb2fb6ee556c0fb2d4859 (diff)
Update missing positional parameter test for .Get
Diffstat (limited to 'hugolib/shortcode_test.go')
-rw-r--r--hugolib/shortcode_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go
index 51f99830b..0f503880e 100644
--- a/hugolib/shortcode_test.go
+++ b/hugolib/shortcode_test.go
@@ -144,10 +144,10 @@ func TestPositionalParamSC(t *testing.T) {
func TestPositionalParamIndexOutOfBounds(t *testing.T) {
t.Parallel()
wt := func(tem tpl.TemplateHandler) error {
- tem.AddTemplate("_internal/shortcodes/video.html", `Playing Video {{ .Get 1 }}`)
+ tem.AddTemplate("_internal/shortcodes/video.html", `Playing Video {{ with .Get 1 }}{{ . }}{{ else }}Missing{{ end }}`)
return nil
}
- CheckShortCodeMatch(t, "{{< video 47238zzb >}}", "Playing Video error: index out of range for positional param at position 1", wt)
+ CheckShortCodeMatch(t, "{{< video 47238zzb >}}", "Playing Video Missing", wt)
}
// some repro issues for panics in Go Fuzz testing