mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 10:18:40 +00:00
1 parent
198efc89ca
commit
0bdc0d62d4
1 file changed
+7
@@ -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)
|
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
|
// some repro issues for panics in Go Fuzz testing
|
||||||
func TestShortcodeGoFuzzRepros(t *testing.T) {
|
func TestShortcodeGoFuzzRepros(t *testing.T) {
|
||||||
tt := tpl.New()
|
tt := tpl.New()
|
||||||
|
|||||||
Reference in new issue
Block a user