mirror of
https://github.com/gohugoio/hugo.git
synced 2025-03-20 07:41:12 +00:00
parent
198efc89ca
commit
0bdc0d62d4
1 changed files with 7 additions and 0 deletions
|
@ -124,6 +124,13 @@ func TestPositionalParamIndexOutOfBounds(t *testing.T) {
|
|||
CheckShortCodeMatch(t, "{{< video 47238zzb >}}", "Playing Video error: index out of range for positional param at position 1", tem)
|
||||
}
|
||||
|
||||
// Issue #2294
|
||||
func TestPositionalParamNil(t *testing.T) {
|
||||
tem := tpl.New()
|
||||
tem.AddInternalShortcode("div.html", `<div data='{{ .Get 0 }}'>{{ .Inner }}</div>`)
|
||||
CheckShortCodeMatch(t, "{{% div %}}**foo**{{% /div %}}", "<div data=''><strong>foo</strong></div>", tem)
|
||||
}
|
||||
|
||||
// some repro issues for panics in Go Fuzz testing
|
||||
func TestShortcodeGoFuzzRepros(t *testing.T) {
|
||||
tt := tpl.New()
|
||||
|
|
Loading…
Reference in a new issue