Add temporary template test for linux/arm

See #1771
This commit is contained in:
Bjørn Erik Pedersen 2016-01-13 14:09:24 +01:00
parent ed3015c350
commit bca2d38e52

View file

@ -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) {