hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit bca2d38e52a1f990892ef1de4a2724aa27f55a22
parent ed3015c35014089deb3b9dae03d0997c04f0834c
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed, 13 Jan 2016 14:09:24 +0100

Add temporary template test for linux/arm

See #1771

Diffstat:
Mtpl/template_test.go | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git 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) {