mirror of
https://github.com/gohugoio/hugo.git
synced 2025-02-18 06:51:30 +00:00
parent
bca2d38e52
commit
e8ca52e93a
1 changed files with 27 additions and 1 deletions
|
@ -94,7 +94,7 @@ html lang=en
|
||||||
|
|
||||||
// A Go stdlib test for linux/arm. Will remove later.
|
// A Go stdlib test for linux/arm. Will remove later.
|
||||||
// See #1771
|
// See #1771
|
||||||
func TestBigInteger(t *testing.T) {
|
func TestBigIntegerFunc(t *testing.T) {
|
||||||
var func1 = func(v int64) error {
|
var func1 = func(v int64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -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
|
// Test for bugs discovered by https://github.com/dvyukov/go-fuzz
|
||||||
func TestTplGoFuzzReports(t *testing.T) {
|
func TestTplGoFuzzReports(t *testing.T) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue