summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-10-11 07:27:08 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-10-11 07:27:08 -0400
commitd51a8d74b25e9e8b342e0a620c8afdfe155c3e09 (patch)
treea1c4f9e518d03033fc3eb46250814e8fd8f8fc44
parent92858a8b5ff04e4196597d9d517f3b2a0d651579 (diff)
Include catalog sort and creation date assignment so that tests of contributed packages can be run
-rw-r--r--contrib/barcode/barcode_test.go7
-rw-r--r--contrib/httpimg/httpimg_test.go7
2 files changed, 14 insertions, 0 deletions
diff --git a/contrib/barcode/barcode_test.go b/contrib/barcode/barcode_test.go
index c12ff12..86aafcc 100644
--- a/contrib/barcode/barcode_test.go
+++ b/contrib/barcode/barcode_test.go
@@ -1,6 +1,8 @@
package barcode_test
import (
+ "time"
+
"github.com/boombuler/barcode/code128"
"github.com/boombuler/barcode/qr"
"github.com/jung-kurt/gofpdf"
@@ -8,6 +10,11 @@ import (
"github.com/jung-kurt/gofpdf/internal/example"
)
+func init() {
+ gofpdf.SetDefaultCatalogSort(true)
+ gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
+}
+
func createPdf() (pdf *gofpdf.Fpdf) {
pdf = gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
diff --git a/contrib/httpimg/httpimg_test.go b/contrib/httpimg/httpimg_test.go
index bf13492..6390f09 100644
--- a/contrib/httpimg/httpimg_test.go
+++ b/contrib/httpimg/httpimg_test.go
@@ -1,11 +1,18 @@
package httpimg_test
import (
+ "time"
+
"github.com/jung-kurt/gofpdf"
"github.com/jung-kurt/gofpdf/contrib/httpimg"
"github.com/jung-kurt/gofpdf/internal/example"
)
+func init() {
+ gofpdf.SetDefaultCatalogSort(true)
+ gofpdf.SetDefaultCreationDate(time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC))
+}
+
func ExampleRegister() {
pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)