Permalink
Browse files

Update missing positional parameter test for .Get

  • Loading branch information...
paulcmal authored and bep committed Apr 17, 2018
1 parent 236f0c8 commit e2b277bba5935c0686cb83f132eae021ef2dc5e1
Showing with 2 additions and 2 deletions.
  1. +2 −2 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

0 comments on commit e2b277b

Please sign in to comment.