From: cmal <paul@cmal.info> Date: Tue, 17 Apr 2018 09:29:00 +0000 (+0200) Subject: Update missing positional parameter test for .Get X-Git-Tag: v0.40~20 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e2b277bba5935c0686cb83f132eae021ef2dc5e1;p=brevno-suite%2Fhugo Update missing positional parameter test for .Get --- diff --git a/hugolib/shortcode_test.go b/hugolib/shortcode_test.go index 51f99830..0f503880 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