Skip to content

Commit

Permalink
Add one more temporary template test for linux/arm
Browse files Browse the repository at this point in the history
See #1771
  • Loading branch information
bep committed Jan 13, 2016
1 parent bca2d38 commit e8ca52e
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion tpl/template_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ html lang=en

// A Go stdlib test for linux/arm. Will remove later.
// See #1771
func TestBigInteger(t *testing.T) {
func TestBigIntegerFunc(t *testing.T) {
var func1 = func(v int64) error {
return nil
}
Expand All @@ -116,6 +116,32 @@ func TestBigInteger(t *testing.T) {

}

// A Go stdlib test for linux/arm. Will remove later.
// See #1771
type BI struct {
}

func (b BI) A(v int64) error {
return nil
}
func TestBigIntegerMethod(t *testing.T) {

data := &BI{}

tpl, err := template.New("foo2").Parse("{{ .A 3e80 }}")
if err != nil {
t.Fatal("Parse failed:", err)
}
err = tpl.ExecuteTemplate(ioutil.Discard, "foo2", data)

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

Expand Down

0 comments on commit e8ca52e

Please sign in to comment.