diff --git a/tpl/template_test.go b/tpl/template_test.go index 76afff25a..18454bf51 100644 --- a/tpl/template_test.go +++ b/tpl/template_test.go @@ -16,6 +16,7 @@ package tpl import ( "bytes" "errors" + "html/template" "io/ioutil" "os" "path/filepath" @@ -91,6 +92,30 @@ html lang=en } +// A Go stdlib test for linux/arm. Will remove later. +// See #1771 +func TestBigInteger(t *testing.T) { + var func1 = func(v int64) error { + return nil + } + var funcs = map[string]interface{}{ + "A": func1, + } + + tpl, err := template.New("foo").Funcs(funcs).Parse("{{ A 3e80 }}") + if err != nil { + t.Fatal("Parse failed:", err) + } + err = tpl.Execute(ioutil.Discard, "foo") + + if err == nil { + t.Fatal("Execute should have failed") + } + + t.Log("Got expected error:", err) + +} + // Test for bugs discovered by https://github.com/dvyukov/go-fuzz func TestTplGoFuzzReports(t *testing.T) {